Provides methods for linking to ActionController::Pagination objects.

You can also build your links manually, like in this example:

<%= link_to “Previous page”, { :page => paginator.current.previous } if paginator.current.previous %>

<%= link_to “Next page”, { :page => paginator.current.next } if paginator.current.next %>

Methods
P
Constants
DEFAULT_OPTIONS = { :name => :page, :window_size => 2, :always_show_anchors => true, :link_to_current_page => false, :params => {} }
 
Instance Public methods

Creates a basic HTML link bar for the given paginator. html_options are passed to link_to.

options are:

:name

the routing name for this paginator (defaults to page)

:window_size

the number of pages to show around the current page (defaults to 2)

:always_show_anchors

whether or not the first and last pages should always be shown (defaults to true)

:link_to_current_page

whether or not the current page should be linked to (defaults to false)

:params

any additional routing parameters for page URLs

Iterate through the pages of a given paginator, invoking a block for each page number that needs to be rendered as a link.