Module WillPaginate::ActiveRecord
In: lib/will_paginate/active_record.rb

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'

Classes and Modules

Module WillPaginate::ActiveRecord::BaseMethods
Module WillPaginate::ActiveRecord::Pagination
Module WillPaginate::ActiveRecord::RelationMethods

[Validate]