Browse files

files are a special case and need whitespace to be significant

  • Loading branch information...
1 parent 45683fb commit 3d150190d89eaedf296789fd638fa978b03d44b4 @indirect indirect committed with dhh Apr 14, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/core_ext/hash/conversions.rb
View
2 activesupport/lib/active_support/core_ext/hash/conversions.rb
@@ -96,7 +96,7 @@ def typecast_xml_value(value)
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)

0 comments on commit 3d15019

Please sign in to comment.