From 3ea2549e7a9c2d6c1ad9c1c773a5c568e3cba15d Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Wed, 30 Aug 2006 01:34:55 +0000 Subject: Fix spurious newlines and spaces in AR::Base#to_xml output git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4862 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/xml_serialization.rb | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'activerecord/lib/active_record/xml_serialization.rb') diff --git a/activerecord/lib/active_record/xml_serialization.rb b/activerecord/lib/active_record/xml_serialization.rb index 2e4a038886..273f3003fb 100644 --- a/activerecord/lib/active_record/xml_serialization.rb +++ b/activerecord/lib/active_record/xml_serialization.rb @@ -214,19 +214,11 @@ module ActiveRecord #:nodoc: def add_tag(attribute) - if attribute.needs_encoding? - builder.tag!( - dasherize? ? attribute.name.dasherize : attribute.name, - attribute.value.to_s, - attribute.decorations(!options[:skip_types]) - ) - else - builder.tag!( - dasherize? ? attribute.name.dasherize : attribute.name, - attribute.decorations(!options[:skip_types])) do - builder << attribute.value.to_s - end - end + builder.tag!( + dasherize? ? attribute.name.dasherize : attribute.name, + attribute.value.to_s, + attribute.decorations(!options[:skip_types]) + ) end def serialize @@ -308,4 +300,4 @@ module ActiveRecord #:nodoc: end end end -end \ No newline at end of file +end -- cgit v1.2.3