diff --git a/kaminari-core/lib/kaminari/helpers/tags.rb b/kaminari-core/lib/kaminari/helpers/tags.rb index dbd5192..bc8b936 100644 --- a/kaminari-core/lib/kaminari/helpers/tags.rb +++ b/kaminari-core/lib/kaminari/helpers/tags.rb @@ -16,11 +16,10 @@ module Kaminari # installed template will be used. # e.g.) Paginator -> $GEM_HOME/kaminari-x.x.x/app/views/kaminari/_paginator.html.erb class Tag - def initialize(template, options = {}) #:nodoc: + def initialize(template, param_name: nil, theme: nil, views_prefix: nil, **options) #:nodoc: @template, @options = template, options.dup - @param_name = @options.delete(:param_name) || Kaminari.config.param_name - @theme = @options.delete(:theme) - @views_prefix = @options.delete(:views_prefix) + @param_name = param_name || Kaminari.config.param_name + @theme, @views_prefix = theme, views_prefix @params = template.params # @params in Rails 5 no longer inherits from Hash @params = @params.to_unsafe_h if @params.respond_to?(:to_unsafe_h)