aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activerecord/lib/active_record/associations/collection_association.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb
index 90899b2078..19ca63d8b8 100644
--- a/activerecord/lib/active_record/associations/collection_association.rb
+++ b/activerecord/lib/active_record/associations/collection_association.rb
@@ -306,14 +306,14 @@ module ActiveRecord
# end
#
# person.pets
- # # => [ #<Pet name: "Snoop", type: "dog">, #<Pet name: "Wy", type: "cat"> ]
+ # # => [#<Pet id: 1, name: "Wy", group: "cats", person_id: 1>]
#
- # other_pets = [Pet.new(name: 'GorbyPuff', type: 'celibrity')]
+ # other_pets = [Pet.new(name: 'GorbyPuff', group: 'celebrities']
#
# person.pets.replace(other_pets)
#
# person.pets
- # # => [ #<Pet name: "GorbyPuff", type: "celebrity"> ]
+ # # => [#<Pet id: 2, name: "GorbyPuff", group: "celebrities", person_id: 1>]
#
# If the supplied array has an incorrect association type, it raises
# an ActiveRecord::AssociationTypeMismatch error: