Skip to content

Commit c8f0c64

Browse files
authored
Merge pull request rails#42461 from Wittiest/main
[ci skip] Fix inaccurate callback documentation
2 parents 3b1f87a + a441eab commit c8f0c64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guides/source/active_record_callbacks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ WARNING. When a transaction completes, the `after_commit` or `after_rollback` ca
494494

495495
WARNING. The code executed within `after_commit` or `after_rollback` callbacks is itself not enclosed within a transaction.
496496

497-
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.
497+
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.
498498

499499
```ruby
500500
class User < ApplicationRecord

0 commit comments

Comments
 (0)