Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 509c920d35a5c8d6c0249f6ae134f9b6de2793a8 1 parent cef81e7
David Heinemeier Hansson dhh authored
Showing with 3 additions and 5 deletions.
  1. +3 −5 railties/lib/dispatcher.rb
8 railties/lib/dispatcher.rb
View
@@ -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.
Please sign in to comment.
Something went wrong with that request. Please try again.