diff options
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r-- | activesupport/lib/active_support/core_ext/array/conversions.rb | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/core_ext/hash/conversions.rb | 14 |
2 files changed, 1 insertions, 15 deletions
diff --git a/activesupport/lib/active_support/core_ext/array/conversions.rb b/activesupport/lib/active_support/core_ext/array/conversions.rb index 6950e21027..a4d056e81c 100644 --- a/activesupport/lib/active_support/core_ext/array/conversions.rb +++ b/activesupport/lib/active_support/core_ext/array/conversions.rb @@ -63,7 +63,7 @@ module ActiveSupport #:nodoc: opts = options.merge({ :root => children }) - options[:builder].tag!(root, options[:skip_types] ? {} : {:type => "array"}) { + options[:builder].tag!(root) { yield options[:builder] if block_given? each { |e| e.to_xml(opts.merge!({ :skip_instruct => true })) } } diff --git a/activesupport/lib/active_support/core_ext/hash/conversions.rb b/activesupport/lib/active_support/core_ext/hash/conversions.rb index 2cccd9c30e..2334bb671b 100644 --- a/activesupport/lib/active_support/core_ext/hash/conversions.rb +++ b/activesupport/lib/active_support/core_ext/hash/conversions.rb @@ -163,20 +163,6 @@ module ActiveSupport #:nodoc: else content end - elsif value['type'] == 'array' - child_key, entries = value.detect { |k,v| k != 'type' } # child_key is throwaway - if entries.nil? - [] - else - case entries.class.to_s # something weird with classes not matching here. maybe singleton methods breaking is_a? - when "Array" - entries.collect { |v| typecast_xml_value(v) } - when "Hash" - [typecast_xml_value(entries)] - else - raise "can't typecast #{entries.inspect}" - end - end elsif value['type'] == 'string' && value['nil'] != 'true' "" else |