aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/initializer.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb
index a69898e2c5..0c06d1bf21 100644
--- a/railties/lib/initializer.rb
+++ b/railties/lib/initializer.rb
@@ -372,10 +372,9 @@ Run `rake gems:install` to install the missing gems.
def load_view_paths
if configuration.frameworks.include?(:action_view)
- 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
+ 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)
end
end