From d8707e0dfc4a3eff6908aa9eba93a4c3961d3d2c Mon Sep 17 00:00:00 2001 From: Rob Jonson Date: Tue, 9 Oct 2018 11:48:40 +0100 Subject: [PATCH] enable_fragment_cache_logging fragment caching was refactored in (I think 5.2) and by default doesn't log cache info this is confusing in development where rails dev:cache now turns on caching, but doesn't show any different logging output better to enable debugging by default for dev - and let people turn it off if preferred --- activestorage/test/dummy/config/environments/development.rb | 1 + .../rails/app/templates/config/environments/development.rb.tt | 1 + 2 files changed, 2 insertions(+) diff --git a/activestorage/test/dummy/config/environments/development.rb b/activestorage/test/dummy/config/environments/development.rb index 47fc5bf25c..4b80d291ca 100644 --- a/activestorage/test/dummy/config/environments/development.rb +++ b/activestorage/test/dummy/config/environments/development.rb @@ -17,6 +17,7 @@ Rails.application.configure do # Enable/disable caching. By default caching is disabled. if Rails.root.join("tmp/caching-dev.txt").exist? config.action_controller.perform_caching = true + config.action_controller.enable_fragment_cache_logging = true config.cache_store = :memory_store config.public_file_server.headers = { diff --git a/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt index 3807c8a9aa..2887bc2d67 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt @@ -16,6 +16,7 @@ Rails.application.configure do # Run rails dev:cache to toggle caching. if Rails.root.join('tmp', 'caching-dev.txt').exist? config.action_controller.perform_caching = true + config.action_controller.enable_fragment_cache_logging = true config.cache_store = :memory_store config.public_file_server.headers = {