1
0
Fork 0
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:
Akira Matsuda 2015-07-24 09:39:01 +09:00 committed by Yuki Nishijima
parent ecdfd4b7a5
commit 980063d1b5

View file

@ -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: