aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/railtie.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/railtie.rb')
-rw-r--r--actionpack/lib/action_view/railtie.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/railtie.rb b/actionpack/lib/action_view/railtie.rb
index 71cd1a788a..501ec07b09 100644
--- a/actionpack/lib/action_view/railtie.rb
+++ b/actionpack/lib/action_view/railtie.rb
@@ -35,5 +35,13 @@ module ActionView
end
end
end
+
+ initializer "action_view.caching" do |app|
+ ActiveSupport.on_load(:action_view) do
+ if app.config.action_view.cache_template_loading.nil?
+ ActionView::Resolver.caching = app.config.cache_classes
+ end
+ end
+ end
end
-end \ No newline at end of file
+end