Module: WillPaginate::ActiveRecord

### Home Classes Methods

### In Files

- lib/will_paginate/active_record.rb

### Namespace

- MODULE WillPaginate::ActiveRecord::BaseMethods
- MODULE WillPaginate::ActiveRecord::Pagination
- MODULE WillPaginate::ActiveRecord::RelationMethods

### Class/Module Index

Quicksearch

- WillPaginate
- WillPaginate::ActionView
- WillPaginate::ActionView::LinkRenderer
- WillPaginate::ActiveRecord
- WillPaginate::ActiveRecord::BaseMethods
- WillPaginate::ActiveRecord::Pagination
- WillPaginate::ActiveRecord::RelationMethods
- WillPaginate::Collection
- WillPaginate::CollectionMethods
- WillPaginate::DataMapper
- WillPaginate::DataMapper::CollectionMethods
- WillPaginate::DataMapper::Pagination
- WillPaginate::Deprecation
- WillPaginate::Deprecation::Hash
- WillPaginate::I18n
- WillPaginate::InvalidPage
- WillPaginate::Merb
- WillPaginate::Merb::LinkRenderer
- WillPaginate::PageNumber
- WillPaginate::PerPage
- WillPaginate::PerPage::Inheritance
- WillPaginate::Railtie
- WillPaginate::Railtie::ControllerRescuePatch
- WillPaginate::Railtie::ShowExceptionsPatch
- WillPaginate::SequelMethods
- WillPaginate::Sinatra
- WillPaginate::Sinatra::Helpers
- WillPaginate::Sinatra::LinkRenderer
- WillPaginate::ViewHelpers
- WillPaginate::ViewHelpers::LinkRenderer
- WillPaginate::ViewHelpers::LinkRendererBase
- Array
- Object

No matching classes.

# WillPaginate::ActiveRecord

# 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'

[Validate]

Generated with the Darkfish Rdoc Generator 2.