Skip to content
No description or website provided.
Find file
New pull request
Pull request Compare This branch is 1 commit ahead, 32 commits behind pilotcreative:master.
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
CHANGELOG.rdoc Initial commit


Display options:

:previous_label -- default: "« Previous" (this parameter is called :prev_label in versions 2.3.2 and older!)
:next_label -- default: "Next »"
:page_links -- when false, only previous/next links are rendered (default: true)
:inner_window -- how many links are shown around the current page (default: 4)
:outer_window -- how many links are around the first and the last page (default: 1)
:separator -- string separator for page HTML elements (default: single space)
:controls -- display controls only at the :top or :bottom of the pagination block (default: :both)
:per_page -- number of items displayed per page (default: 10)

HTML options:

:class -- CSS class name for the generated DIV (default: "pagination")
:container -- toggles rendering of the DIV container for pagination links, set to false only when you are rendering your own pagination markup (default: true)
:id -- HTML ID for the container (default: nil). Pass +true+ to have the ID automatically generated from the class name of objects in collection: for example, paginating
ArticleComment models would yield an ID of "article_comments_pagination".

Advanced options:

:param_name -- parameter name for page number in URLs (default: :page)
:params -- additional parameters when generating pagination links (eg. :controller => "foo", :action => nil)
:renderer -- class name, class or instance of a link renderer (default: Pagination::LinkRenderer)

All options not recognized by paginate will become HTML attributes on the container element for pagination links (the DIV). For example:

<% paginate @posts, :style => 'font-size: small' do |posts| %> … <% end %>

… will result in:

<div class=“pagination” style=“font-size: small”> … </div>

No changes in controllers.

Something went wrong with that request. Please try again.