Skip to content

Commit 8b97fef

Browse files
committed
Fix isolation level reset
1 parent d92c6a2 commit 8b97fef

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/active_record/connection_adapters/sqlserver/transaction.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ def current_isolation_level
2626

2727
end
2828

29-
Transaction.send :include, SQLServerTransaction
29+
Transaction.send :prepend, SQLServerTransaction
3030

3131
module SQLServerRealTransaction
3232

3333
attr_reader :starting_isolation_level
3434

35-
def initialize(connection, options, run_commit_callbacks: false)
35+
def initialize(connection, options, *args)
3636
@connection = connection
3737
@starting_isolation_level = current_isolation_level if options[:isolation]
3838
super
@@ -58,7 +58,6 @@ def reset_starting_isolation_level
5858

5959
end
6060

61-
RealTransaction.send :include, SQLServerRealTransaction
62-
61+
RealTransaction.send :prepend, SQLServerRealTransaction
6362
end
6463
end

0 commit comments

Comments
 (0)