diff options
author | Rick Olson <technoweenie@gmail.com> | 2006-07-13 00:44:09 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2006-07-13 00:44:09 +0000 |
commit | 1ec9f8d049eda0c52a3045752ed447f371462676 (patch) | |
tree | 1b6294b8bd99df02229a79cc55855908c851a85a /activesupport/lib/active_support/core_ext/hash/conversions.rb | |
parent | 35f7cc23badaf51eca7d27b72613ab220d6936a6 (diff) | |
download | rails-1ec9f8d049eda0c52a3045752ed447f371462676.tar.gz rails-1ec9f8d049eda0c52a3045752ed447f371462676.tar.bz2 rails-1ec9f8d049eda0c52a3045752ed447f371462676.zip |
Correctly convert <foo nil=true> 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
Diffstat (limited to 'activesupport/lib/active_support/core_ext/hash/conversions.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/hash/conversions.rb | 2 |
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 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 |