mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00
Do not pass :param_name option in paginate method
Do it in Tag class so we don't have to give it on the helper method.
This commit is contained in:
parent
8c0b9d5d1a
commit
a4dc7a1ed4
2 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ module Kaminari
|
||||||
# * <tt>:remote</tt> - Ajax? (false by default)
|
# * <tt>:remote</tt> - Ajax? (false by default)
|
||||||
# * <tt>:ANY_OTHER_VALUES</tt> - Any other hash key & values would be directly passed into each tag as :locals value.
|
# * <tt>:ANY_OTHER_VALUES</tt> - Any other hash key & values would be directly passed into each tag as :locals value.
|
||||||
def paginate(scope, options = {}, &block)
|
def paginate(scope, options = {}, &block)
|
||||||
paginator = Kaminari::Helpers::Paginator.new self, options.reverse_merge(:current_page => scope.current_page, :total_pages => scope.total_pages, :per_page => scope.limit_value, :param_name => Kaminari.config.param_name, :remote => false)
|
paginator = Kaminari::Helpers::Paginator.new self, options.reverse_merge(:current_page => scope.current_page, :total_pages => scope.total_pages, :per_page => scope.limit_value, :remote => false)
|
||||||
paginator.to_s
|
paginator.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ module Kaminari
|
||||||
class Tag
|
class Tag
|
||||||
def initialize(template, options = {}) #:nodoc:
|
def initialize(template, options = {}) #:nodoc:
|
||||||
@template, @options = template, options.dup
|
@template, @options = template, options.dup
|
||||||
@param_name = @options.delete(:param_name)
|
@param_name = @options.delete(:param_name) || Kaminari.config.param_name
|
||||||
@theme = @options[:theme] ? "#{@options.delete(:theme)}/" : ''
|
@theme = @options[:theme] ? "#{@options.delete(:theme)}/" : ''
|
||||||
@params = @options[:params] ? template.params.merge(@options.delete :params) : template.params
|
@params = @options[:params] ? template.params.merge(@options.delete :params) : template.params
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue