diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-11-26 20:54:47 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-11-26 20:54:47 -0600 |
commit | 4d910b033379727e5e7355590c50c72fc75e56db (patch) | |
tree | ada3e45bf32d37d8f17f6ea944c8400912da26a8 /railties | |
parent | 9d2002a12a473f5b35c52db82518f4631776414f (diff) | |
download | rails-4d910b033379727e5e7355590c50c72fc75e56db.tar.gz rails-4d910b033379727e5e7355590c50c72fc75e56db.tar.bz2 rails-4d910b033379727e5e7355590c50c72fc75e56db.zip |
Super lazy load view paths in development mode (no indexing or caching at all). Switch layout finders to use view path api to take advantage of cache.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/initializer.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index b0abf3379c..f282cff2de 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -372,9 +372,10 @@ Run `rake gems:install` to install the missing gems. def load_view_paths if configuration.frameworks.include?(:action_view) - ActionView::PathSet::Path.eager_load_templates! if configuration.cache_classes - ActionController::Base.view_paths.load if configuration.frameworks.include?(:action_controller) - ActionMailer::Base.template_root.load if configuration.frameworks.include?(:action_mailer) + if configuration.cache_classes + ActionController::Base.view_paths.load if configuration.frameworks.include?(:action_controller) + ActionMailer::Base.template_root.load if configuration.frameworks.include?(:action_mailer) + end end end |