Skip to content

Commit

Permalink
Merge pull request #7111 from coopdevs/fix-static-assets-deprecation
Browse files Browse the repository at this point in the history
Replace assets config with public_file_server
  • Loading branch information
mkllnk authored Mar 18, 2021
2 parents e53c996 + 8c57ccd commit 33f7fa7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
config.action_controller.perform_caching = true

# Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_files = false
config.public_file_server.enabled = false

# Compress JavaScripts and CSS
config.assets.compress = true
Expand Down
2 changes: 1 addition & 1 deletion config/environments/staging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
config.action_controller.perform_caching = true

# Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_files = false
config.public_file_server.enabled = false

# Compress JavaScripts and CSS
config.assets.compress = true
Expand Down
4 changes: 2 additions & 2 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
config.eager_load = false

# Configure static asset server for tests with Cache-Control for performance
config.serve_static_files = true
config.static_cache_control = "public, max-age=3600"
config.public_file_server.enabled = true
config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }

# Separate cache stores when running in parallel
config.cache_store = :file_store, Rails.root.join("tmp", "cache", "paralleltests#{ENV['TEST_ENV_NUMBER']}")
Expand Down

0 comments on commit 33f7fa7

Please sign in to comment.