Permalink
Browse files

Tried delaying database disconnect until after dependency resolution …

…(references #6687, #6700) [DHH]

git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/1-2-pre-release@5627 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent cef81e7 commit 509c920d35a5c8d6c0249f6ae134f9b6de2793a8 @dhh dhh committed Nov 25, 2006
Showing with 3 additions and 5 deletions.
  1. +3 −5 railties/lib/dispatcher.rb
@@ -55,18 +55,16 @@ def dispatch(cgi = nil, session_options = ActionController::CgiRequest::DEFAULT_
# 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.

0 comments on commit 509c920

Please sign in to comment.