mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #14694 from heironimus/callback_guide
Add after_commit/after_rollback to callback list
This commit is contained in:
commit
632d9d2237
1 changed files with 3 additions and 0 deletions
|
@ -92,6 +92,7 @@ Here is a list with all the available Active Record callbacks, listed in the sam
|
|||
* `around_create`
|
||||
* `after_create`
|
||||
* `after_save`
|
||||
* `after_commit/after_rollback`
|
||||
|
||||
### Updating an Object
|
||||
|
||||
|
@ -103,12 +104,14 @@ Here is a list with all the available Active Record callbacks, listed in the sam
|
|||
* `around_update`
|
||||
* `after_update`
|
||||
* `after_save`
|
||||
* `after_commit/after_rollback`
|
||||
|
||||
### Destroying an Object
|
||||
|
||||
* `before_destroy`
|
||||
* `around_destroy`
|
||||
* `after_destroy`
|
||||
* `after_commit/after_rollback`
|
||||
|
||||
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.
|
||||
|
||||
|
|
Loading…
Reference in a new issue