instance method convert_parameters_to_hashes

Ruby on Rails 8.0.4

Since v5.2.8.1 Private

Available in: v5.2.8.1 v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

convert_parameters_to_hashes(value, using, &block)

No documentation comment.

Parameters

value req
using req
block block
Source
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 1156
      def convert_parameters_to_hashes(value, using, &block)
        case value
        when Array
          value.map { |v| convert_parameters_to_hashes(v, using) }
        when Hash
          transformed = value.transform_values do |v|
            convert_parameters_to_hashes(v, using)
          end
          (block_given? ? transformed.to_h(&block) : transformed).with_indifferent_access
        when Parameters
          value.send(using)
        else
          value
        end
      end

Defined in actionpack/lib/action_controller/metal/strong_parameters.rb line 1156 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionController::Parameters

Type at least 2 characters to search.

↑↓ navigate · open · esc close