Module: Ckeditor::Http
- Defined in:
- lib/ckeditor/http.rb
Defined Under Namespace
Classes: QqFile, UploadedFile
Class Method Summary collapse
-
.normalize_param(*args) ⇒ Object
Convert nested Hash to HashWithIndifferentAccess and replace file upload hash with UploadedFile objects.
Class Method Details
.normalize_param(*args) ⇒ Object
Convert nested Hash to HashWithIndifferentAccess and replace file upload hash with UploadedFile objects
78 79 80 81 82 83 84 85 86 87 |
# File 'lib/ckeditor/http.rb', line 78 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 |