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