mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #12085 from valk/master
FIX reload! within rails console --sandbox causes undefined method rollb...
This commit is contained in:
commit
15455d76c8
1 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
|||
ActiveRecord::Base.connection.begin_transaction(joinable: false)
|
||||
|
||||
at_exit do
|
||||
ActiveRecord::Base.connection.rollback_transaction
|
||||
if ActiveRecord::Base.connection.transaction_open?
|
||||
ActiveRecord::Base.connection.rollback_transaction
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue