From 2aeb3228060ae09e3b1177190b798e7eb6620430 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Tue, 28 May 2024 13:17:31 +0200 Subject: [PATCH] Let's use the delegation to the transaction manager here `within_new_transaction` is delegated to the transaction manager. Let's remove this explicit receiver to honor the delegation and for consistency with usage of the also delegated `current_transaction`. --- .../connection_adapters/abstract/database_statements.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb index 9df12249499..9669f64876a 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb @@ -358,7 +358,7 @@ module ActiveRecord end yield current_transaction else - transaction_manager.within_new_transaction(isolation: isolation, joinable: joinable, &block) + within_new_transaction(isolation: isolation, joinable: joinable, &block) end rescue ActiveRecord::Rollback # rollbacks are silently swallowed