From 31458a94a6ee5c96cbdcdaafc6720fe2dc459ed6 Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Thu, 28 Apr 2016 02:51:10 +0530 Subject: [PATCH] Push action_view.collection_caching to be called towards the end, since it depends on being called after action_controller.set_configs. This causes, other AV initializers after it to be called after all of AC initializers, which get pulled in before since action_controller.set_configs gets called. Hence, push initializer depending on after hook, to be called after all initializers for this railtie are done. --- actionview/lib/action_view/railtie.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/actionview/lib/action_view/railtie.rb b/actionview/lib/action_view/railtie.rb index 09ce693aff..c83614c89a 100644 --- a/actionview/lib/action_view/railtie.rb +++ b/actionview/lib/action_view/railtie.rb @@ -37,10 +37,6 @@ module ActionView end end - initializer "action_view.collection_caching", after: "action_controller.set_configs" do |app| - PartialRenderer.collection_cache = app.config.action_controller.cache_store - end - initializer "action_view.per_request_digest_cache" do |app| ActiveSupport.on_load(:action_view) do if app.config.consider_all_requests_local @@ -55,6 +51,10 @@ module ActionView end end + initializer "action_view.collection_caching", after: "action_controller.set_configs" do |app| + PartialRenderer.collection_cache = app.config.action_controller.cache_store + end + rake_tasks do |app| unless app.config.api_only load "action_view/tasks/cache_digests.rake"