Forum: Ruby on Rails will_paginate help

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ead43bcb0202410540a6a7cee5955d46?d=identicon&s=25 Fresh Mix (giga)
on 2009-01-19 20:41
Can I limit results in will_paginate plugin?
I want to paginate only 100 results 10 per page.
C7ce3af7050f4580f56654aa6d52a36e?d=identicon&s=25 Tranquiliste (Guest)
on 2009-01-19 20:46
(Received via mailing list)
You can use the  parameter :per_page => 10 and in your search add
a :limit => 100


On Jan 19, 8:41 pm, James Bond <rails-mailing-l...@andreas-s.net>
C7ce3af7050f4580f56654aa6d52a36e?d=identicon&s=25 Tranquiliste (Guest)
on 2009-01-19 20:49
(Received via mailing list)
Sorry I was too quick

something like Object.find(:all, :limit => 100).paginate(:page =>
params[:page], :per_page =>  10)
238b0b3a01e0d9891c7a669a468fa84d?d=identicon&s=25 bearblu (Guest)
on 2009-01-19 21:40
(Received via mailing list)
@users = User.paginate(:page => params[:page], :per_page => 10) works
for me.


On Jan 19, 11:41 am, James Bond <rails-mailing-l...@andreas-s.net>
This topic is locked and can not be replied to.