Every repository with this icon (
Every repository with this icon (
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 “mislav-will_paginate” because it’s being built by GitHub. If you have a gem named “will_paginate”, it is old and you are advised to remove it from your system.
Important: read about the backwards incompatibility in the next big, framework-agnostic release of will_paginate library.
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
- Installation instructions
- Simple search functionality
- Troubleshooting or Report bugs
- Join the Google group
- API documentation (generated with RDoc)
- How to use will_paginate with non-ActiveRecord collection or array
Also on GitHub:
- Browse the source code
- See recent commits
- Read the CHANGELOG
- Internals on how will_paginate hooks into Rails
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.







