Skip to content

Commit

Permalink
Fix Rails::Initializer since #view_paths is never nil
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6127 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
technoweenie committed Feb 4, 2007
1 parent f2f2686 commit 38e5d21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions railties/lib/initializer.rb
Expand Up @@ -273,8 +273,8 @@ def initialize_framework_logging
# paths have already been set, it is not changed, otherwise it is # paths have already been set, it is not changed, otherwise it is
# set to use Configuration#view_path. # set to use Configuration#view_path.
def initialize_framework_views def initialize_framework_views
ActionMailer::Base.template_root ||= configuration.view_path if configuration.frameworks.include?(:action_mailer) 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 = [configuration.view_path] if configuration.frameworks.include?(:action_controller) && ActionController::Base.view_paths.empty?
end end


# If ActionController is not one of the loaded frameworks (Configuration#frameworks) # If ActionController is not one of the loaded frameworks (Configuration#frameworks)
Expand Down

0 comments on commit 38e5d21

Please sign in to comment.