From 3c0e7b1b51cb775e55a4b10a9872f74cecacd6a7 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 12 Sep 2006 01:17:11 +0000 Subject: Fix script/console --sandbox for internal transactions changes. Closes #5738. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5088 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/CHANGELOG | 2 ++ railties/lib/console_sandbox.rb | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 4d9a295226..da9a20fc60 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fix script/console --sandbox for internal transactions changes. #5738 [chris@octopod.info, charles.gerungan@gmail.com] + * Remove the uncanny default of adding all app/models/*/ directories to the load path. This change will break application which expect the current behavior. As documented in initializer.rb, the workaround is: diff --git a/railties/lib/console_sandbox.rb b/railties/lib/console_sandbox.rb index 80f3dbc223..5d57679c43 100644 --- a/railties/lib/console_sandbox.rb +++ b/railties/lib/console_sandbox.rb @@ -1,6 +1,6 @@ -ActiveRecord::Base.lock_mutex +ActiveRecord::Base.send :increment_open_transactions ActiveRecord::Base.connection.begin_db_transaction at_exit do ActiveRecord::Base.connection.rollback_db_transaction - ActiveRecord::Base.unlock_mutex + ActiveRecord::Base.send :decrement_open_transactions end -- cgit v1.2.3