Skip to content

Commit 2aeb322

Browse files
committed
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`.
1 parent 9ce4d44 commit 2aeb322

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ def transaction(requires_new: nil, isolation: nil, joinable: true, &block)
358358
end
359359
yield current_transaction
360360
else
361-
transaction_manager.within_new_transaction(isolation: isolation, joinable: joinable, &block)
361+
within_new_transaction(isolation: isolation, joinable: joinable, &block)
362362
end
363363
rescue ActiveRecord::Rollback
364364
# rollbacks are silently swallowed

0 commit comments

Comments
 (0)