From edb42088571f9ad61908032c3df12b4700e099e9 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 20 Aug 2006 14:38:58 +0000 Subject: to_xml: correct naming of included associations. Closes #5831. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4794 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/xml_serialization.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/xml_serialization.rb b/activerecord/lib/active_record/xml_serialization.rb index 5324ae5a0a..2e4a038886 100644 --- a/activerecord/lib/active_record/xml_serialization.rb +++ b/activerecord/lib/active_record/xml_serialization.rb @@ -190,7 +190,7 @@ module ActiveRecord #:nodoc: tag = tag.dasherize if dasherize? builder.tag!(tag) do - records.each { |r| r.to_xml(opts) } + records.each { |r| r.to_xml(opts.merge(:root => association.to_s.singularize)) } end end when :has_one, :belongs_to -- cgit v1.2.3