From d6b642a23d95af766fd1dff4be8d83c7ad8ddfbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Mon, 15 Apr 2024 16:38:26 +0200 Subject: [PATCH] Run after_commit callbacks in order defined This change doesn't affect us, since we don't use `after_commit` callbacks, and, among our dependencies, AFAIK only the Devise gem uses them, and it only defines one after_commit callback when creating a record and another one when updating it, so we're never going to have more than one callback being executed after a transaction is finished. --- config/initializers/new_framework_defaults_7_1.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/new_framework_defaults_7_1.rb b/config/initializers/new_framework_defaults_7_1.rb index e95cd1e7b..e4fba9331 100644 --- a/config/initializers/new_framework_defaults_7_1.rb +++ b/config/initializers/new_framework_defaults_7_1.rb @@ -204,7 +204,7 @@ Rails.application.config.active_record.marshalling_format_version = 7.1 # This matches the behaviour of all other callbacks. # In previous versions of Rails, they ran in the inverse order. #++ -# Rails.application.config.active_record.run_after_transaction_callbacks_in_order_defined = true +Rails.application.config.active_record.run_after_transaction_callbacks_in_order_defined = true ### # Whether a `transaction` block is committed or rolled back when exited via `return`, `break` or `throw`.