From ef735255edd995394440739d70cef4b6ea54c797 Mon Sep 17 00:00:00 2001 From: Aurel Branzeanu Date: Tue, 5 Jul 2016 13:47:51 +0300 Subject: [PATCH] Brought back config.static_cache_control for Rails < 5 --- spec/dummy/config/environments/test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/dummy/config/environments/test.rb b/spec/dummy/config/environments/test.rb index 6b7215d..b9d6831 100644 --- a/spec/dummy/config/environments/test.rb +++ b/spec/dummy/config/environments/test.rb @@ -14,7 +14,8 @@ # Configure static asset server for tests with Cache-Control for performance. config.serve_static_assets = true - config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' } + config.static_cache_control = 'public, max-age=3600' if Rails::VERSION::MAJOR < 5 + config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' } if Rails::VERSION::MAJOR >= 5 # Show full error reports and disable caching. config.consider_all_requests_local = true