From 0297b31b8235ee5c64743fdd4f922b008dd83af0 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 3 Dec 2006 16:47:53 +0000 Subject: Fixed Array#to_xml when it contains a series of hashes (each piece would get its own XML declaration) (closes #6610) [thkarcher/cyu] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/core_ext/array/conversions.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport/lib/active_support/core_ext/array') diff --git a/activesupport/lib/active_support/core_ext/array/conversions.rb b/activesupport/lib/active_support/core_ext/array/conversions.rb index 1a5ddee9c6..51ac83294c 100644 --- a/activesupport/lib/active_support/core_ext/array/conversions.rb +++ b/activesupport/lib/active_support/core_ext/array/conversions.rb @@ -61,9 +61,9 @@ module ActiveSupport #:nodoc: options[:builder].instruct! unless options.delete(:skip_instruct) - opts = options.merge({ :skip_instruct => true, :root => children }) + opts = options.merge({ :root => children }) - options[:builder].tag!(root) { each { |e| e.to_xml(opts) } } + options[:builder].tag!(root) { each { |e| e.to_xml(opts.merge!({ :skip_instruct => true })) } } end end -- cgit v1.2.3