aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2011-04-14 17:05:30 +0800
committerDavid Heinemeier Hansson <david@loudthinking.com>2011-04-14 17:08:57 +0800
commitbd032fe97eabed62130bb745b0955090099fe525 (patch)
tree0841cf773a7833cb396abf536daa4e7a53aef1b9
parentd01be122b84bd0a5f6315650593564b1d8aa50d0 (diff)
downloadrails-bd032fe97eabed62130bb745b0955090099fe525.tar.gz
rails-bd032fe97eabed62130bb745b0955090099fe525.tar.bz2
rails-bd032fe97eabed62130bb745b0955090099fe525.zip
files are a special case and need whitespace to be significant
-rw-r--r--activesupport/lib/active_support/core_ext/hash/conversions.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/hash/conversions.rb b/activesupport/lib/active_support/core_ext/hash/conversions.rb
index 7e3a8c6775..61a1d88b0e 100644
--- a/activesupport/lib/active_support/core_ext/hash/conversions.rb
+++ b/activesupport/lib/active_support/core_ext/hash/conversions.rb
@@ -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)