diff options
author | Rick Olson <technoweenie@gmail.com> | 2006-09-01 16:09:18 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2006-09-01 16:09:18 +0000 |
commit | e4a4287c971f6e61f59815988f5fc69176cb14de (patch) | |
tree | bf1237a7899e023ff9bf54d449af4ad517265cc6 /activesupport/lib | |
parent | 5f175edde59e65b991d84fe30cad2b102fc7347b (diff) | |
download | rails-e4a4287c971f6e61f59815988f5fc69176cb14de.tar.gz rails-e4a4287c971f6e61f59815988f5fc69176cb14de.tar.bz2 rails-e4a4287c971f6e61f59815988f5fc69176cb14de.zip |
Fix cases where empty xml nodes weren't being translated to nil in Hash.create_from_xml [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4895 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib')
-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 38992f2926..fdc5a165b0 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? || value['nil'] == 'true' ? nil : value.inject({}) do |h,(k,v)| + (value.blank? || value['type'] || value['nil'] == 'true') ? nil : value.inject({}) do |h,(k,v)| h[k] = typecast_xml_value(v) h end |