1
0
Fork 0
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:
Vipul A M 2016-10-26 14:00:20 +05:30 committed by GitHub
commit ec4aaccb1b

View file

@ -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)