README.rdoc

WillPaginate

Pagination is just limiting the number of records displayed. Why should you
let it get in your way while developing, then? This plugin makes magic
happen. Did you ever want to be able to do just this on a model:

Post.paginate :page => 1, :order => 'created_at DESC'

… and then render the page links with a single view helper? Well, now you
can.

… or don't worry about it at all. WillPaginate defines it to be
30 by default. But you can always specify the count explicitly when
calling paginate:

@posts = Post.paginate :page => params[:page], :per_page => 50

The paginate finder wraps the original finder and returns your
resultset that now has some new properties. You can use the collection as
you would with any ActiveRecord resultset. WillPaginate view helpers also
need that object to be able to render pagination: