Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

root/branches/2-1-caching/railties/lib/console_sandbox.rb

Revision 5088, 230 bytes (checked in by bitsweat, 2 years ago)

Fix script/console --sandbox for internal transactions changes. Closes #5738.

Line 
1 ActiveRecord::Base.send :increment_open_transactions
2 ActiveRecord::Base.connection.begin_db_transaction
3 at_exit do
4   ActiveRecord::Base.connection.rollback_db_transaction
5   ActiveRecord::Base.send :decrement_open_transactions
6 end
Note: See TracBrowser for help on using the browser.