instance method
params_hash_has_key?
Ruby on Rails 8.1.2
Since v8.0.4 PrivateAvailable in: v8.0.4 v8.1.2
Signature
params_hash_has_key?(hash, key)
No documentation comment.
Parameters
-
hashreq -
keyreq
Source
# File actionpack/lib/action_dispatch/http/param_builder.rb, line 175
def params_hash_has_key?(hash, key)
return false if key.include?("[]")
key.split(/[\[\]]+/).inject(hash) do |h, part|
next h if part == ""
return false unless params_hash_type?(h) && h.key?(part)
h[part]
end
true
end
Defined in actionpack/lib/action_dispatch/http/param_builder.rb line 175
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::ParamBuilder