module Ckeditor::Http

Public Class Methods

normalize_param(*args) click to toggle source

Convert nested Hash to HashWithIndifferentAccess and replace file upload hash with UploadedFile objects

# File lib/ckeditor/http.rb, line 77
def self.normalize_param(*args)
  value = args.first
  if Hash === value && value.has_key?(:tempfile)
    UploadedFile.new(value)
  elsif value.is_a?(String)
    QqFile.new(*args)
  else
    value
  end
end