Skip to content

Commit

Permalink
Still need to setup view paths
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed Feb 9, 2009
1 parent 893e9eb commit 5c63be1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions railties/lib/initializer.rb
Expand Up @@ -181,6 +181,9 @@ def process
# Observers are loaded after plugins in case Observers or observed models are modified by plugins.
load_observers

# Load view path cache
load_view_paths

# Load application classes
load_application_classes

Expand Down Expand Up @@ -364,6 +367,15 @@ def load_observers
end
end

def load_view_paths
if configuration.frameworks.include?(:action_view)
if configuration.cache_classes
ActionController::Base.view_paths = configuration.view_path if configuration.frameworks.include?(:action_controller)
ActionMailer::Base.template_root = view_path if configuration.frameworks.include?(:action_mailer)
end
end
end

# Eager load application classes
def load_application_classes
return if $rails_rake_task
Expand Down

4 comments on commit 5c63be1

@stephankaag
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit broke the situations where cache_classes is true.

undefined local variable or method `view_path’ for #Rails::Initializer:0×1a59334 (NameError)

@stephankaag
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ for Rails::Initializer

@josh
Copy link
Contributor Author

@josh josh commented on 5c63be1 Feb 9, 2009

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please comment on http://rails.lighthouseapp.com/projects/8994/tickets/1909

@methodmissing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small typo :

http://github.com/methodmissing/rails/commit/2332de3ad90d33b0b18e6afebb045f157e58f354

Please sign in to comment.