提交 38e5d21b 编写于 作者: R Rick Olson

Fix Rails::Initializer since #view_paths is never nil

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6127 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 f2f2686f
......@@ -273,8 +273,8 @@ def initialize_framework_logging
# paths have already been set, it is not changed, otherwise it is
# set to use Configuration#view_path.
def initialize_framework_views
ActionMailer::Base.template_root ||= configuration.view_path if configuration.frameworks.include?(:action_mailer)
ActionController::Base.view_paths ||= [configuration.view_path] if configuration.frameworks.include?(:action_controller)
ActionMailer::Base.template_root ||= configuration.view_path if configuration.frameworks.include?(:action_mailer)
ActionController::Base.view_paths = [configuration.view_path] if configuration.frameworks.include?(:action_controller) && ActionController::Base.view_paths.empty?
end
# If ActionController is not one of the loaded frameworks (Configuration#frameworks)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册