mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Docs: Clarify when assoc. methods persist
Because I can never remember if `collection_singular_ids=` persists or not (it does). [ci skip]
This commit is contained in:
parent
28a7c98fe6
commit
f95fe79f27
1 changed files with 4 additions and 4 deletions
|
@ -1477,7 +1477,7 @@ WARNING: Objects will _always_ be removed from the database, ignoring the `:depe
|
||||||
|
|
||||||
##### `collection=(objects)`
|
##### `collection=(objects)`
|
||||||
|
|
||||||
The `collection=` method makes the collection contain only the supplied objects, by adding and deleting as appropriate.
|
The `collection=` method makes the collection contain only the supplied objects, by adding and deleting as appropriate. The changes are persisted to the database.
|
||||||
|
|
||||||
##### `collection_singular_ids`
|
##### `collection_singular_ids`
|
||||||
|
|
||||||
|
@ -1489,7 +1489,7 @@ The `collection_singular_ids` method returns an array of the ids of the objects
|
||||||
|
|
||||||
##### `collection_singular_ids=(ids)`
|
##### `collection_singular_ids=(ids)`
|
||||||
|
|
||||||
The `collection_singular_ids=` method makes the collection contain only the objects identified by the supplied primary key values, by adding and deleting as appropriate.
|
The `collection_singular_ids=` method makes the collection contain only the objects identified by the supplied primary key values, by adding and deleting as appropriate. The changes are persisted to the database.
|
||||||
|
|
||||||
##### `collection.clear`
|
##### `collection.clear`
|
||||||
|
|
||||||
|
@ -2006,7 +2006,7 @@ The `collection.destroy` method removes one or more objects from the collection
|
||||||
|
|
||||||
##### `collection=(objects)`
|
##### `collection=(objects)`
|
||||||
|
|
||||||
The `collection=` method makes the collection contain only the supplied objects, by adding and deleting as appropriate.
|
The `collection=` method makes the collection contain only the supplied objects, by adding and deleting as appropriate. The changes are persisted to the database.
|
||||||
|
|
||||||
##### `collection_singular_ids`
|
##### `collection_singular_ids`
|
||||||
|
|
||||||
|
@ -2018,7 +2018,7 @@ The `collection_singular_ids` method returns an array of the ids of the objects
|
||||||
|
|
||||||
##### `collection_singular_ids=(ids)`
|
##### `collection_singular_ids=(ids)`
|
||||||
|
|
||||||
The `collection_singular_ids=` method makes the collection contain only the objects identified by the supplied primary key values, by adding and deleting as appropriate.
|
The `collection_singular_ids=` method makes the collection contain only the objects identified by the supplied primary key values, by adding and deleting as appropriate. The changes are persisted to the database.
|
||||||
|
|
||||||
##### `collection.clear`
|
##### `collection.clear`
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue