mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #26896 from j-dexx/update_habtm_docs
Update HABTM documentation in guides [ci skip]
This commit is contained in:
commit
ec4aaccb1b
1 changed files with 1 additions and 3 deletions
|
@ -1994,11 +1994,9 @@ The `collection.delete` method removes one or more objects from the collection b
|
|||
@part.assemblies.delete(@assembly1)
|
||||
```
|
||||
|
||||
WARNING: This does not trigger callbacks on the join records.
|
||||
|
||||
##### `collection.destroy(object, ...)`
|
||||
|
||||
The `collection.destroy` method removes one or more objects from the collection by running `destroy` on each record in the join table, including running callbacks. This does not destroy the objects.
|
||||
The `collection.destroy` method removes one or more objects from the collection by deleting records in the join table. This does not destroy the objects.
|
||||
|
||||
```ruby
|
||||
@part.assemblies.destroy(@assembly1)
|
||||
|
|
Loading…
Reference in a new issue