diff options
author | Jamis Buck <jamis@37signals.com> | 2006-08-30 01:34:55 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2006-08-30 01:34:55 +0000 |
commit | 3ea2549e7a9c2d6c1ad9c1c773a5c568e3cba15d (patch) | |
tree | 93763847e632b17f08b4d1f0c19639da5998647b /activerecord | |
parent | ff063d700d2fda2076217ab0479e8602253ab49c (diff) | |
download | rails-3ea2549e7a9c2d6c1ad9c1c773a5c568e3cba15d.tar.gz rails-3ea2549e7a9c2d6c1ad9c1c773a5c568e3cba15d.tar.bz2 rails-3ea2549e7a9c2d6c1ad9c1c773a5c568e3cba15d.zip |
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
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/CHANGELOG | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/xml_serialization.rb | 20 |
2 files changed, 8 insertions, 14 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index 5846d11b58..db5bd52867 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fix spurious newlines and spaces in AR::Base#to_xml output [Jamis Buck] + * has_one supports the :dependent => :delete option which skips the typical callback chain and deletes the associated object directly from the database. #5927 [Chris Mear, Jonathan Viney] * Nested subclasses are not prefixed with the parent class' table_name since they should always use the base class' table_name. #5911 [Jonathan Viney] 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 |