Paginating_find view example?


#1

I’m using the paginating_find plugin and I believe I have my
controller setup correctly:

@users = Users.find :all,
:page => {:size => 20},
:order => “created_at DESC”

I’m confused though on how to setup the view. This is what I tried:

<%= link_to ‘next’, :page => @users.next_page %>

Can anyone please post an example? Thanks in advance.


#2

Try this:
<%= paginating_links(@users) %>

Take a look at the link helpers:
http://svn.cardboardrocket.com/paginating_find/lib/paging_helper.rb