提交 31458a94 编写于 作者: V Vipul A M

Push action_view.collection_caching to be called towards the end, since it...

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.
上级 f7a98601
......@@ -37,10 +37,6 @@ class Railtie < Rails::Railtie # :nodoc:
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 @@ class Railtie < Rails::Railtie # :nodoc:
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"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册