class ActionController::Parameters

def convert_parameters_to_hashes(value, using, &block)

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