files are a special case and need whitespace to be significant

This commit is contained in:
Andre Arko
2011-04-14 17:05:30 +08:00
committed by David Heinemeier Hansson
parent d01be122b8
commit bd032fe97e

View File

@@ -108,7 +108,7 @@ class Hash
raise "can't typecast #{entries.inspect}"
end
end
elsif value.has_key?("__content__") && value["__content__"].present?
elsif value['type'] == 'file' || value["__content__"].present?
content = value["__content__"]
if parser = ActiveSupport::XmlMini::PARSING[value["type"]]
parser.arity == 1 ? parser.call(content) : parser.call(content, value)