Module: WillPaginate::ActiveRecord

Extended by:
BaseMethods, Pagination, PerPage
Defined in:
lib/will_paginate/active_record.rb

Overview

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 BaseMethods

paginate_by_sql

Methods included from Pagination

page, paginate

Methods included from PerPage

extended, per_page, per_page=