instance method params_hash_has_key?

Ruby on Rails 8.0.4

Since v8.0.4 Private

Available in: v8.0.4 v8.1.2

Signature

params_hash_has_key?(hash, key)

No documentation comment.

Parameters

hash req
key req
Source
# File actionpack/lib/action_dispatch/http/param_builder.rb, line 174
      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 174 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionDispatch::ParamBuilder

Type at least 2 characters to search.

↑↓ navigate · open · esc close