From bd032fe97eabed62130bb745b0955090099fe525 Mon Sep 17 00:00:00 2001 From: Andre Arko Date: Thu, 14 Apr 2011 17:05:30 +0800 Subject: files are a special case and need whitespace to be significant --- activesupport/lib/active_support/core_ext/hash/conversions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/core_ext/hash') 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) -- cgit v1.2.3