mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #9630 from robertjwhitney/update_collection_docs
Update documentation for collection<< to reflect behavior for new parent objects.
This commit is contained in:
commit
2357fa8ffa
1 changed files with 2 additions and 2 deletions
|
@ -1024,7 +1024,7 @@ module ActiveRecord
|
|||
# [collection<<(object, ...)]
|
||||
# Adds one or more objects to the collection by setting their foreign keys to the collection's primary key.
|
||||
# Note that this operation instantly fires update sql without waiting for the save or update call on the
|
||||
# parent object.
|
||||
# parent object, unless the parent object is a new record.
|
||||
# [collection.delete(object, ...)]
|
||||
# Removes one or more objects from the collection by setting their foreign keys to +NULL+.
|
||||
# Objects will be in addition destroyed if they're associated with <tt>dependent: :destroy</tt>,
|
||||
|
@ -1433,7 +1433,7 @@ module ActiveRecord
|
|||
# Adds one or more objects to the collection by creating associations in the join table
|
||||
# (<tt>collection.push</tt> and <tt>collection.concat</tt> are aliases to this method).
|
||||
# Note that this operation instantly fires update sql without waiting for the save or update call on the
|
||||
# parent object.
|
||||
# parent object, unless the parent object is a new record.
|
||||
# [collection.delete(object, ...)]
|
||||
# Removes one or more objects from the collection by removing their associations from the join table.
|
||||
# This does not destroy the objects.
|
||||
|
|
Loading…
Reference in a new issue