Class: Kaminari::Helpers::NextPage
- Includes:
- Link
- Defined in:
- lib/kaminari/helpers/tags.rb
Overview
The “next” page of the current page
Instance Method Summary collapse
-
#initialize(template, params: {}, param_name: nil, theme: nil, views_prefix: nil, **options) ⇒ NextPage
constructor
TODO: Remove this initializer before 1.3.0.
-
#page ⇒ Object
:nodoc:.
Methods included from Link
Methods inherited from Tag
Constructor Details
#initialize(template, params: {}, param_name: nil, theme: nil, views_prefix: nil, **options) ⇒ NextPage
TODO: Remove this initializer before 1.3.0.
144 145 146 147 148 149 150 151 152 153 |
# File 'lib/kaminari/helpers/tags.rb', line 144 def initialize(template, params: {}, param_name: nil, theme: nil, views_prefix: nil, **) #:nodoc: # params in Rails 5 may not be a Hash either, # so it must be converted to a Hash to be merged into @params if params && params.respond_to?(:to_unsafe_h) ActiveSupport::Deprecation.warn 'Explicitly passing params to helpers could be omitted.' params = params.to_unsafe_h end super(template, params: params, param_name: param_name, theme: theme, views_prefix: views_prefix, **) end |
Instance Method Details
#page ⇒ Object
:nodoc:
155 156 157 |
# File 'lib/kaminari/helpers/tags.rb', line 155 def page #:nodoc: @options[:current_page] + 1 end |