1
0
Fork 0
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:
Santiago Pastorino 2013-08-30 10:44:25 -07:00
commit 15455d76c8

View file

@ -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