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.
Fresh M. (Guest)
on 2009-01-19 21:41
Can I limit results in will_paginate plugin?
I want to paginate only 100 results 10 per page.
Tranquiliste (Guest)
on 2009-01-19 21: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 B. <removed_email_address@domain.invalid>
Tranquiliste (Guest)
on 2009-01-19 21:49
(Received via mailing list)
Sorry I was too quick

something like Object.find(:all, :limit => 100).paginate(:page =>
params[:page], :per_page =>  10)
bearblu (Guest)
on 2009-01-19 22:40
(Received via mailing list)
@users = User.paginate(:page => params[:page], :per_page => 10) works
for me.


On Jan 19, 11:41 am, James B. <removed_email_address@domain.invalid>
This topic is locked and can not be replied to.