aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/hash/conversions.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/hash/conversions.rb b/activesupport/lib/active_support/core_ext/hash/conversions.rb
index 470537fe24..3d6a8d8588 100644
--- a/activesupport/lib/active_support/core_ext/hash/conversions.rb
+++ b/activesupport/lib/active_support/core_ext/hash/conversions.rb
@@ -211,8 +211,9 @@ module ActiveSupport #:nodoc:
elsif value.blank? || value['nil'] == 'true'
nil
# If the type is the only element which makes it then
- # this still makes the value nil
- elsif value['type'] && value.size == 1
+ # this still makes the value nil, except if type is
+ # a xml node(where type['value'] is a Hash)
+ elsif value['type'] && value.size == 1 && !value['type'].is_a?(::Hash)
nil
else
xml_value = value.inject({}) do |h,(k,v)|