Skip to content

Commit

Permalink
Update config.serve_static_assets to config.serve_static_files (#240)
Browse files Browse the repository at this point in the history
The configuration option `config.serve_static_assets` has been renamed
to `config.serve_static_files in Rails 4.2 [1], and the old name will
be removed in Rails 5.0 [2].

[1] https://www.github.com/rails/rails/pull/18100
[2] rails/rails@463b5d7
  • Loading branch information
bagedevimo authored Jan 24, 2024
1 parent 53db70c commit 4fc9595
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

# Disable Rails's static asset server
# In production, Apache or nginx will already do this
config.serve_static_assets = true # true so Webrick testing of production mode works
config.serve_static_files = true # true so Webrick testing of production mode works

# Enable serving of images, stylesheets, and javascripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com"
Expand Down
2 changes: 1 addition & 1 deletion config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
config.active_support.deprecation = :stderr

# Configure static asset server for tests with Cache-Control for performance
config.serve_static_assets = true
config.serve_static_files = true
config.static_cache_control = "public, max-age=3600"

# Raise exception on mass assignment protection for Active Record models
Expand Down

0 comments on commit 4fc9595

Please sign in to comment.