From 1ec9f8d049eda0c52a3045752ed447f371462676 Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Thu, 13 Jul 2006 00:44:09 +0000 Subject: Correctly convert to nil when using Hash.create_from_xml. [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4607 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- 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/conversions.rb') diff --git a/activesupport/lib/active_support/core_ext/hash/conversions.rb b/activesupport/lib/active_support/core_ext/hash/conversions.rb index 1e7f8eb68d..7927a39d44 100644 --- a/activesupport/lib/active_support/core_ext/hash/conversions.rb +++ b/activesupport/lib/active_support/core_ext/hash/conversions.rb @@ -101,7 +101,7 @@ module ActiveSupport #:nodoc: else content end else - value.empty? ? nil : value.inject({}) do |h,(k,v)| + value.empty? || value['nil'] == 'true' ? nil : value.inject({}) do |h,(k,v)| h[k] = typecast_xml_value(v) h end -- cgit v1.2.3