Module: WillPaginate::ActiveRecord

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