Public feed
#723112
# controller
@people_page, @people = paginate :people, :per_page => 5
the :people is the name of the model, the @people_page is the page reference and the @people is the collection of data (recordset)
#view
<% for people in @people %>
<%= link_to people.name, :action => 'show', :id => people.id %><br>
<% end -%>
that obviously loops through the collection of data and drags them out 1 by 1.
<%= link_to "<", { :page => @people_page.current.previous } if @people_page.current.previous %>
<%= link_to ">", { :page => @people_page.current.next } if @people_page.current.next %>
and this is the next and previous links. if @people_page.current.previous is true, show the link