You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guides/source/active_record_callbacks.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -554,18 +554,6 @@ WARNING. The code executed within `after_commit` or `after_rollback` callbacks i
554
554
555
555
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.
556
556
557
-
WARNING. In the context of a single transaction, if you interact with multiple
558
-
loaded objects that represent the same record in the database, there's a crucial
559
-
behavior in the `after_commit` and `after_rollback` callbacks to note. These
560
-
callbacks are triggered only for the first object of the specific record that
561
-
undergoes a change within the transaction. Other loaded objects, despite
562
-
representing the same database record, will not have their respective
563
-
`after_commit` or `after_rollback` callbacks triggered. This nuanced behavior is
564
-
particularly impactful in scenarios where you expect independent callback
565
-
execution for each object associated with the same database record. It can
566
-
influence the flow and predictability of callback sequences, leading to potential
567
-
inconsistencies in application logic following the transaction.
0 commit comments