diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-11-25 19:59:00 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-11-25 19:59:00 +0000 |
commit | 619e5c29f45ccbe626adff654b3a6b0d9fa4ad1f (patch) | |
tree | 0a81bb4000cfbc346aca6a9f911efc5dc735276e | |
parent | 396b3f2befe5d75ac04e732eae195dc6d9d20201 (diff) | |
download | rails-619e5c29f45ccbe626adff654b3a6b0d9fa4ad1f.tar.gz rails-619e5c29f45ccbe626adff654b3a6b0d9fa4ad1f.tar.bz2 rails-619e5c29f45ccbe626adff654b3a6b0d9fa4ad1f.zip |
Tried delaying database disconnect until after dependency resolution (references #6687, #6700) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5627 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | railties/lib/dispatcher.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/railties/lib/dispatcher.rb b/railties/lib/dispatcher.rb index 3ac1b6c17a..ce6f505895 100644 --- a/railties/lib/dispatcher.rb +++ b/railties/lib/dispatcher.rb @@ -55,18 +55,16 @@ 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! - if defined?(ActiveRecord) - ActiveRecord::Base.reset_subclasses - ActiveRecord::Base.clear_active_connections! - end + ActiveRecord::Base.reset_subclasses if defined?(ActiveRecord) Dependencies.clear ActiveSupport::Deprecation.silence do # TODO: Remove after 1.2 Class.remove_class(*Reloadable.reloadable_classes) end + + ActiveRecord::Base.clear_active_connections! if defined?(ActiveRecord) end - # Add a preparation callback. Preparation callbacks are run before every # request in development mode, and before the first request in production # mode. |