Changeset 4794
- Timestamp:
- 08/20/06 14:38:58 (2 years ago)
- Files:
-
- trunk/activerecord/CHANGELOG (modified) (1 diff)
- trunk/activerecord/lib/active_record/xml_serialization.rb (modified) (1 diff)
- trunk/activerecord/test/base_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activerecord/CHANGELOG
r4792 r4794 1 1 *SVN* 2 3 * to_xml: correct naming of included associations. #5831 [josh.starcher@gmail.com] 2 4 3 5 * Pushing a record onto a has_many :through sets the association's foreign key to the associate's primary key and adds it to the correct association. #5815, #5829 [josh@hasmanythrough.com] trunk/activerecord/lib/active_record/xml_serialization.rb
r4652 r4794 191 191 192 192 builder.tag!(tag) do 193 records.each { |r| r.to_xml(opts ) }193 records.each { |r| r.to_xml(opts.merge(:root => association.to_s.singularize)) } 194 194 end 195 195 end trunk/activerecord/test/base_test.rb
r4770 r4794 1320 1320 assert xml.include?(%(<title>The Second Topic's of the day</title>)) 1321 1321 end 1322 1323 def test_array_to_xml_including_has_many_association 1324 xml = [ topics(:first), topics(:second) ].to_xml(:indent => 0, :skip_instruct => true, :include => :replies) 1325 assert xml.include?(%(<replies><reply>)) 1326 end 1322 1327 1323 1328 def test_array_to_xml_including_has_one_association