aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-02-09 14:53:14 -0600
committerJoshua Peek <josh@joshpeek.com>2009-02-09 14:53:14 -0600
commit5c63be1f92edcd3ed60fae90b8eb129da19c5099 (patch)
treeb42a643a2d42514b151efa16a1a493790b805862 /railties/lib
parent893e9eb99504705419ad6edac14d00e71cef5f12 (diff)
downloadrails-5c63be1f92edcd3ed60fae90b8eb129da19c5099.tar.gz
rails-5c63be1f92edcd3ed60fae90b8eb129da19c5099.tar.bz2
rails-5c63be1f92edcd3ed60fae90b8eb129da19c5099.zip
Still need to setup view paths
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/initializer.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb
index 2cc0943b78..11aa8a534e 100644
--- a/railties/lib/initializer.rb
+++ b/railties/lib/initializer.rb
@@ -181,6 +181,9 @@ module Rails
# 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
@@ -364,6 +367,15 @@ Run `rake gems:install` to install the missing gems.
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