mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00
AC::Parameters in Rails 5 does no more inherits from Hash but composes a Hash
Conflicts: lib/kaminari/helpers/tags.rb
This commit is contained in:
parent
ecdfd4b7a5
commit
980063d1b5
1 changed files with 6 additions and 0 deletions
|
@ -19,6 +19,12 @@ module Kaminari
|
|||
@theme = @options.delete(:theme)
|
||||
@views_prefix = @options.delete(:views_prefix)
|
||||
@params = @options[:params] ? template.params.merge(@options.delete :params) : template.params
|
||||
# @params in Rails 5 does no more inherits from Hash but composes a Hash
|
||||
if @params.instance_variable_defined?(:@parameters) && !@params.respond_to?(:deep_merge)
|
||||
@params = @params.instance_variable_get :@parameters
|
||||
else
|
||||
@params = @params.with_indifferent_access
|
||||
end
|
||||
end
|
||||
|
||||
def to_s(locals = {}) #:nodoc:
|
||||
|
|
Loading…
Reference in a new issue