Module: WillPaginate::ActiveRecord

Extended by:
BaseMethods, Pagination, PerPage
Defined in:


Paginating finders for ActiveRecord models

WillPaginate adds paginate, per_page and other methods to ActiveRecord::Base class methods and associations.

In short, paginating finders are equivalent to ActiveRecord finders; the only difference is that we start with “paginate” instead of “find” and that :page is required parameter:

@posts = Post.paginate :all, :page => params[:page], :order => 'created_at DESC'

Defined Under Namespace

Modules: BaseMethods, Pagination, RelationMethods

Method Summary

Methods included from PerPage

extended, per_page, per_page=

Methods included from Pagination

page, paginate

Methods included from BaseMethods