Skip to content

Commit

Permalink
Brought back config.static_cache_control for Rails < 5
Browse files Browse the repository at this point in the history
  • Loading branch information
texpert committed Jul 5, 2016
1 parent bbbd88e commit ef73525
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/dummy/config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ef73525

Please sign in to comment.