1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #42461 from Wittiest/main

[ci skip] Fix inaccurate callback documentation
This commit is contained in:
Zachary Scott 2021-06-14 08:19:47 +09:00 committed by GitHub
commit c8f0c6450c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -494,7 +494,7 @@ WARNING. When a transaction completes, the `after_commit` or `after_rollback` ca
WARNING. The code executed within `after_commit` or `after_rollback` callbacks is itself not enclosed within a transaction.
WARNING. Using both `after_create_commit` and `after_update_commit` in the same model will only allow the last callback defined to take effect, and will override all others.
WARNING. Using both `after_create_commit` and `after_update_commit` with the same method name will only allow the last callback defined to take effect, as they both internally alias to `after_commit` which overrides previously defined callbacks with the same method name.
```ruby
class User < ApplicationRecord