Skip to content

Commit

Permalink
Merge pull request #12085 from valk/master
Browse files Browse the repository at this point in the history
FIX reload! within rails console --sandbox causes undefined method rollb...
  • Loading branch information
spastorino committed Aug 30, 2013
1 parent 26eef6a commit 1c6556f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion activerecord/lib/active_record/railties/console_sandbox.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,7 @@
ActiveRecord::Base.connection.begin_transaction(joinable: false) ActiveRecord::Base.connection.begin_transaction(joinable: false)


at_exit do at_exit do
ActiveRecord::Base.connection.rollback_transaction if ActiveRecord::Base.connection.transaction_open?
ActiveRecord::Base.connection.rollback_transaction
end
end end

0 comments on commit 1c6556f

Please sign in to comment.