diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-11-23 05:16:46 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-11-23 05:16:46 +0000 |
commit | a02dbe0a3dee9c5f7645de74f233c57cabbdfcac (patch) | |
tree | 3a33f0d91706cd1cce6ef9d8aaeaee90abcba325 /railties | |
parent | 83dd1d8a034d7254b0d1314f9dc39a8e80e49fc7 (diff) | |
download | rails-a02dbe0a3dee9c5f7645de74f233c57cabbdfcac.tar.gz rails-a02dbe0a3dee9c5f7645de74f233c57cabbdfcac.tar.bz2 rails-a02dbe0a3dee9c5f7645de74f233c57cabbdfcac.zip |
Added ActiveRecord::Base.clear_active_connections! in development mode so the database connection is not carried over from request to request. Some databases won't reread the schema if that doesn't happen (I'm looking at you SQLite), so you have to restart the server after each migration (= no fun) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5618 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/lib/dispatcher.rb | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 0033c7db37..02474a6508 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Added ActiveRecord::Base.clear_active_connections! in development mode so the database connection is not carried over from request to request. Some databases won't reread the schema if that doesn't happen (I'm looking at you SQLite), so you have to restart the server after each migration (= no fun) [DHH] + * Made RAILS_GEM_VERSION work for beta gems too, so specifying 1.1.6 will give you 1.1.6.4520 if available [DHH] * Update to Prototype and script.aculo.us [5579]. [Thomas Fuchs] diff --git a/railties/lib/dispatcher.rb b/railties/lib/dispatcher.rb index 1d604bc254..3ac1b6c17a 100644 --- a/railties/lib/dispatcher.rb +++ b/railties/lib/dispatcher.rb @@ -55,7 +55,11 @@ class Dispatcher # mailers, and so forth. This allows them to be loaded again without having # to restart the server (WEBrick, FastCGI, etc.). def reset_application! - ActiveRecord::Base.reset_subclasses if defined?(ActiveRecord) + if defined?(ActiveRecord) + ActiveRecord::Base.reset_subclasses + ActiveRecord::Base.clear_active_connections! + end + Dependencies.clear ActiveSupport::Deprecation.silence do # TODO: Remove after 1.2 Class.remove_class(*Reloadable.reloadable_classes) |