diff options
author | Rick Olson <technoweenie@gmail.com> | 2007-02-04 22:41:37 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2007-02-04 22:41:37 +0000 |
commit | f2f2686f97363652b8d38a6e67c27e555030ad4b (patch) | |
tree | d72e6578958a08d62da94d3b63e47ef3bb9c787a /railties/lib | |
parent | 92195e68a02715d29ef9d4b3bf66409c014f7174 (diff) | |
download | rails-f2f2686f97363652b8d38a6e67c27e555030ad4b.tar.gz rails-f2f2686f97363652b8d38a6e67c27e555030ad4b.tar.bz2 rails-f2f2686f97363652b8d38a6e67c27e555030ad4b.zip |
Update Rails Initializer to use ActionController::Base#view_paths [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6126 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/initializer.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index 6bb65d3871..81cd783a6c 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -268,14 +268,13 @@ module Rails end end - # Sets the +template_root+ for ActionController::Base and ActionMailer::Base + # Sets +ActionController::BaseEview_paths+ and +ActionMailer::Base#template_root+ # (but only for those frameworks that are to be loaded). If the framework's - # +template_root+ has 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. def initialize_framework_views - for framework in ([ :action_controller, :action_mailer ] & configuration.frameworks) - framework.to_s.camelize.constantize.const_get("Base").template_root ||= configuration.view_path - end + 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) end # If ActionController is not one of the loaded frameworks (Configuration#frameworks) |