提交 c0657a90 编写于 作者: R Rick Olson

Fix Dispatcher.reset_application! so that AR subclasses are removed and...

Fix Dispatcher.reset_application! so that AR subclasses are removed and Observers re-initialized *after* Reloadable classes are removed. Closes #5743.  [Rick Olson]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4716 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 c40b1a4a
*SVN*
* Fix Dispatcher.reset_application! so that AR subclasses are removed and Observers re-initialized *after* Reloadable classes are removed. Closes #5743. [Rick Olson]
* Clarify usage of script/plugin source. Closes #5344. [james.adam@gmail.com]
* Add Dispatcher.to_prepare and config.to_prepare to provide a pre-request hook. [Nicholas Seckar]
......
......@@ -55,8 +55,8 @@ def dispatch(cgi = nil, session_options = ActionController::CgiRequest::DEFAULT_
# to restart the server (WEBrick, FastCGI, etc.).
def reset_application!
Dependencies.clear
ActiveRecord::Base.reset if defined?(ActiveRecord)
Class.remove_class(*Reloadable.reloadable_classes)
ActiveRecord::Base.reset if defined?(ActiveRecord)
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册