mislav / will_paginate

Adaptive pagination plugin for web frameworks and other applications

Home | Edit | New

Home

This is the official home for the will_paginate library. You can find will_paginate API documentation here.

The name of the will_paginate gem is now “will_paginate” and hosted on Gemcutter. If you have a gem named “mislav-will_paginate”, it is stable but will never receive updates, since GitHub is no longer building new gems. You are strongly advised to switch your apps over to use the “will_paginate” gem since it will receive updates.

Important: read about the backwards incompatibility in the next big, framework-agnostic release of will_paginate library (v3.0).

Refer to installation instructions for more info. The gem is preferred method of installation; if you have the plugin in “vendor/plugins/will_paginate/” directory, it may be best to remove it and simply configure your application to load the gem.

Basics

It’s very easy to do pagination on ActiveRecord models:

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

In the view, page links can be rendered with a single view helper:

<%= will_paginate @posts %>

Resources

Also on GitHub:

The plugin officially supports Rails versions 1.2.6 up to 2.3.2. Databases supported should be all which have ActiveRecord adapters; the test suite covers MySQL, PostgreSQL and SQLite3.

Last edited by mislav, Sun Nov 22 10:46:40 -0800 2009
Home | Edit | New
Versions: