Displaying 20 results from an estimated 6000 matches similar to: "Kaminari: how page=1-param in link to first page?"
2011 May 26
3
Kaminari rspec testing undefined method page.
Someone use kaminari for pagination?
I''m doing some tests but I don''t know why I have an undefined method page.
Here is my simple test:
describe "GET index" do
it "assigns all fire_preventions as @fire_preventions" do
FirePrevention.stub(:search) { [mock_fire_prevention] }
get :index
assigns(:fire_preventions).should
2013 Apr 03
2
strange behavior with active relation any? method
In console, I run the following and any? returns true:
drivers = Driver.select("drivers.*,
drivers.id").joins([:reports, :driving_habits]).where("extract(MONTH
FROM reports.time) = ? AND extract(YEAR FROM reports.time) = ?", 3,
2013).uniq.order("drivers.id asc").page(2).per(1)
drivers.any?
=> true
This correctly evaluates to true because the relation contains one
2012 May 22
4
undefined method `paginate'
I am working with Railsspace social networking book. I stuck in the
problem when i am doing paginate for the search result. It gives the
following error.
NoMethodError in CommunityController#index
undefined method `paginate'' for #<CommunityController:0x57436f0>
My Controller Index page coding is below
def index
@title = "Community"
@letters =
2011 Dec 07
5
Find_by_sql help?
How to make it work with paginator (kaminari)?
MySQL and full text search: Words (id, word)
@words = Word.find_by_sql(["SELECT id, word, MATCH (word) AGAINST (?) AS
Score FROM words WHERE MATCH (word) AGAINST (?) ORDER BY Score Desc,
word!=?", params[:search],params[:search],params[:search]])
I can''t add .page(params[:page]).per(5) to the end of "find_by_sql()" so
2006 Jun 15
8
rails saves it to the database and I don''t want to
Hello:
I am developing a web application to book machines for an event.
so I have an event model
class Event < ActiveRecord::Base
has_many :datetimes
...
end
and a datetime model
class Datetime < ActiveRecord::Base
belongs_to :event
...
end
I have developed a view with the event information and information for
the datetimes. and in the event_controller when I capture a datetime I
2010 Apr 06
3
(Rails3-master) erubis: how to use things like preprocessing?
(Rails3 latest git master)
Subject says it. I''m trying to figure out how to use erubis features
described here: http://www.kuwata-lab.com/erubis/users-guide.05.html#rails,
especially preprocessing. My question is, where do I place the
Erubis::Helpers::RailsHelper.preprocessing=true
Not in application.rb, at that point the object does not exist yet it
seems. I wonder why I
2010 Jul 13
1
will_paginate destroys link_to_remote?!
Hello,
I''ve got a list in a view and each of element of it has a link_to_remote
and everything worked like a charm. Now I added AJAX pagination and the
link_to_remote doesn''t work anymore.
This is the partial of the list:
<% for character in characters %>
<%= character.name %>
<%= link_to_remote t(''.add''), :url =>
2007 Jul 19
3
InPlace[Collection]Editor rewrite: it's in trunk!
Hi all,
For those of you who don''t follow Thomas Fuch''s blog, know that a
complete rewrite of InPlaceEditor / InPlaceCollectionEditor just made it
into the trunk.
You''ll find all the juicy details on Thomas'' post:
http://mir.aculo.us/2007/7/17/in-place-editing-the-summer-2007-rewrite
Do note that this is my rewrite, so if you find bugs etc., don''t
2011 Oct 14
0
Any data table component for rails?
Hello all,
is there any data table component for rails
which can sort/search/pagination etc?
I''ve checked out jquery plugin datatables,
which can sort/search/pagination, but for
large dataset of course need to go server side,
need to pass params[:sort]/params[:search]/params[:pagination]
to server side, which involves a lot of code,
I''ve checked out rubygems.org and found a
2010 Apr 14
5
Model Magic
>> [].eql? @product.files
=> false
>> @product.files.eql? []
=> true
version: 2.3.5
Product :has_many files
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
2007 Apr 11
12
redirection doesn''t get detected well?
I''m doing a redirect in one of my controller actions and somehow I can''t
spec it, see this pastie: http://pastie.caboo.se/53120.
When following the link from a browser I''m being redirected to the right
page.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2017 Jun 10
2
Pacaging/build issues with AIX and vac (dovecot-2.2.25)
On 10/06/2017 14:42, Michael Felt wrote:
>
> Next chapter in packaging.(Not meant to be extensive, only what I run
> across and is easy to report)
c)
378 | int quota_root_default_init(struct quota_root *root, const
char *args,
379 | const char **error_r)
380 | {
381 | const struct quota_param_parser default_params[] = {
2013 Jan 03
1
Trying to add bootstrap to existing project, getting CSS compile error: missing file
Trying to add bootstrap to an app being ported to Rails 3.2.3.
I get the following error:
Error compiling asset application.css:
Sass::SyntaxError: File to import not found or unreadable: bootstrap.
Here''s my gem file:
source ''http://rubygems.org''
gem ''rails'', ''3.2.9''
group :assets do
gem ''sass-rails'',
2012 Mar 05
8
Create a select with HABM
Hello, I have two tables with association HABM, projects and users, and
in projects I want to show all users that was associated to the project.
I have try with this:
<%= select( "user", "id", Project.all.collect { |p| [ p.name, p.id ] } )
%>
But only show all my projects, but Iz don''t know who show only the user
in a determinated project.
class Project <
2007 Feb 08
16
exported ressources
Hello,
i wanted to know if we can use exported ressrouces to do things like this:
- for all nodes tagged as xxx create on the node yyy a file which content is a template where we can have each hostname
, or create one file per nodes matching
exemple
/etc/hosts.allow
sshd: host1
sshd: host2
...
or
/etc/backuppc/host1
/etc/backuppc/host2
...
from the docs it seems i can collect only ALL
2012 Dec 04
0
Empty test suite is run after every rake task
When I run rake db:migrate or rake -T I get these lines at the end:
Finished in 0.000276 seconds.
0 tests, 0 assertions, 0 failures, 0 errors
My Gemfile is:
source ''http://rubygems.org''
gem ''rack''
gem ''rails'', ''3.0.9''
gem "acl9", ''0.12.0''
gem "fastercsv"#, :version =>
2012 Jun 14
1
Cucumber/RSpec ::: Capybara? Webrat What am I using??
Hey everybody
I''m currently reading through the Pragmatic Programmers RSpec book, and
I really enjoy it.
But I’m facing some problems because of the fact that the book is
already some years old, I guess. I have installed rvm and use Ruby
1.9.3, and I didn’t really get some Rails code examples to work
properly, so I tried it with a 1.8.7 installation, but there I had some
other problems
2011 May 15
0
Upgrading to Rails 3.1
I''m working on updating my rails 3.0.5 app to rails 3.1.0.beta1 and I
seem to be running into a problem when doing `rake rails:update` when it
runs `rake rails:update:javascripts`
Here is my bundle:
Gems included by the bundle:
* RedCloth (4.2.7)
* actionmailer (3.1.0.beta1)
* actionpack (3.1.0.beta1)
* activemodel (3.1.0.beta1)
* activerecord (3.1.0.beta1)
* activeresource
2007 Apr 18
3
' X is not missing constant Y ' , problem after rails update
Hello,
I''m just updating my rails version to 1.2.3
I get the '' X is not missing constant Y'' message for all request in my
existing applications.
Exemple :
app/controller/login/login.rb
use a model in :
app/models/login/connect.rb
This exemple give the error :
" Login is not missing constant Connect! "
What''s wrong im my configuration ?
--
2011 Jan 18
1
Semi-Regular Time Series with Missing Values
Hi,
I'm trying to make a ts object that has both NA values and a frequency other
than 1 (so I can use stl). I've tried all permutations I can think of, but
cannot get the desired (expected?) results.
The values live in x and the corresponding semi-regular time stamps are in
t:
> library('zoo')
> z = zoo(x, order.by=t, frequency=24)
> zzr = as.zooreg(z, start=0)
> zr