Module: Kaminari::ActionViewExtension::InstanceMethods
- Defined in:
- lib/kaminari/helpers/action_view_extension.rb
Instance Method Summary collapse
Instance Method Details
#paginate(scope, options = {}, &block) ⇒ Object
Helpers
A helper that renders the pagination links.
<%= paginate @articles %>
Options
-
:window
- The “inner window” size (2 by default). -
:outer_window
- The “outer window” size (1 by default). -
:left
- The “left outer window” size (1 by default). -
:right
- The “right outer window” size (1 by default). -
:params
- url_for parameters for the links (:controller, :action, etc.) -
:param_name
- parameter name for page number in the links (:page by default) -
:remote
- Ajax? (false by default) -
:ANY_OTHER_VALUES
- Any other hash key & values would be directly passed into each tag as :locals value.
20 21 22 |
# File 'lib/kaminari/helpers/action_view_extension.rb', line 20 def paginate(scope, = {}, &block) Kaminari::Helpers::PaginationRenderer.new self, .reverse_merge(:current_page => scope.current_page, :num_pages => scope.num_pages, :per_page => scope.limit_value, :param_name => :page, :remote => false) end |