diff options
author | John Firebaugh <john_firebaugh@us.ibm.com> | 2011-02-21 18:51:21 -0800 |
---|---|---|
committer | John Firebaugh <john_firebaugh@us.ibm.com> | 2011-07-17 11:34:06 -0700 |
commit | 0933b6d1ba78405cc376bf4ff256356135cd8c5e (patch) | |
tree | 79d4a526923a972be14358a1dc35a4531e70b1cd | |
parent | cbf924ef0854c26d0d0340d0b09a26782e0c661d (diff) | |
download | rails-0933b6d1ba78405cc376bf4ff256356135cd8c5e.tar.gz rails-0933b6d1ba78405cc376bf4ff256356135cd8c5e.tar.bz2 rails-0933b6d1ba78405cc376bf4ff256356135cd8c5e.zip |
We already have the record; no need to retrieve it again
-rw-r--r-- | activerecord/lib/active_record/serializers/xml_serializer.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/serializers/xml_serializer.rb b/activerecord/lib/active_record/serializers/xml_serializer.rb index f8e6cf958c..67f6c7833c 100644 --- a/activerecord/lib/active_record/serializers/xml_serializer.rb +++ b/activerecord/lib/active_record/serializers/xml_serializer.rb @@ -219,8 +219,8 @@ module ActiveRecord #:nodoc: end end end - elsif record = @serializable.send(association) - record.to_xml(merged_options) + else + records.to_xml(merged_options) end end |