class ActionDispatch::Request::Utils::ParamEncoder

:nodoc:

def self.handle_array(params)

def self.handle_array(params)
  params.map! { |el| normalize_encode_params(el) }
end

def self.normalize_encode_params(params)

Convert nested Hash to HashWithIndifferentAccess.
:nodoc:
def self.normalize_encode_params(params)
  case params
  when Array
    handle_array params
  when Hash
    if params.has_key?(:tempfile)
      ActionDispatch::Http::UploadedFile.new(params)
    else
      params.transform_values do |val|
        normalize_encode_params(val)
      end.with_indifferent_access
    end
  else
    params
  end
end