1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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