Froze rails gems
[depot.git] / vendor / rails / railties / lib / console_sandbox.rb
diff --git a/vendor/rails/railties/lib/console_sandbox.rb b/vendor/rails/railties/lib/console_sandbox.rb
new file mode 100644 (file)
index 0000000..65a3d68
--- /dev/null
@@ -0,0 +1,6 @@
+ActiveRecord::Base.connection.increment_open_transactions
+ActiveRecord::Base.connection.begin_db_transaction
+at_exit do
+  ActiveRecord::Base.connection.rollback_db_transaction
+  ActiveRecord::Base.connection.decrement_open_transactions
+end