Fix parameter hash detection

Hash-like objects will respond to each_value, whereas arrays do not.
This commit is contained in:
BrokenEagle
2020-08-18 05:32:53 +00:00
parent 975d42c9ac
commit 36fa8efcd5

View File

@@ -2,7 +2,7 @@ module Searchable
extend ActiveSupport::Concern
def parameter_hash?(params)
params.present? && params.respond_to?(:each)
params.present? && params.respond_to?(:each_value)
end
def parameter_depth(params)