instance method
params_hash_has_key?
Ruby on Rails edge
Since v8.0.5.1 Private — implementation detail, not part of the public APISignature
params_hash_has_key?(hash, key)
No documentation comment.
Parameters
-
hashreq -
keyreq
Source
# File actionpack/lib/action_dispatch/http/param_builder.rb, line 171
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 171
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::ParamBuilder