mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Pluralize callback
Users could have more than one `before_destroy` callback in their models. [ci skip]
This commit is contained in:
parent
e8ee2187ae
commit
8801108c0f
1 changed files with 3 additions and 1 deletions
|
@ -117,7 +117,9 @@ Here is a list with all the available Active Record callbacks, listed in the sam
|
|||
|
||||
WARNING. `after_save` runs both on create and update, but always _after_ the more specific callbacks `after_create` and `after_update`, no matter the order in which the macro calls were executed.
|
||||
|
||||
NOTE: `before_destroy` callback should be placed before `dependent: :destroy` associations (or use the `prepend: true` option), to ensure they execute before the records are deleted by `dependent: :destroy`.
|
||||
NOTE: `before_destroy` callbacks should be placed before `dependent: :destroy`
|
||||
associations (or use the `prepend: true` option), to ensure they execute before
|
||||
the records are deleted by `dependent: :destroy`.
|
||||
|
||||
### `after_initialize` and `after_find`
|
||||
|
||||
|
|
Loading…
Reference in a new issue