Skip to content

Commit

Permalink
Merge pull request #3528 from alphagov/some-config-updates-following-…
Browse files Browse the repository at this point in the history
…rails-8-upgrade

Update some more config following Rails 8 upgrade
  • Loading branch information
mike3985 authored Jan 21, 2025
2 parents 81efb36 + b2800ca commit 3496cce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@
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 = { "cache-control" => "public, max-age=#{2.days.to_i}" }
else
config.action_controller.perform_caching = false

config.cache_store = :null_store
end

# Change to :null_store to avoid any caching.
config.cache_store = :memory_store

# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false

Expand Down Expand Up @@ -63,7 +62,7 @@
config.active_record.verbose_query_logs = true

# Append comments with runtime information tags to SQL queries in logs.
# config.active_record.query_log_tags_enabled = true
config.active_record.query_log_tags_enabled = true

# Highlight code that enqueued background job in logs.
config.active_job.verbose_enqueue_logs = true
Expand Down
4 changes: 2 additions & 2 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# Turn on fragment caching in view templates.
config.action_controller.perform_caching = true

# Disable serving static files from `public/`, relying on NGINX/Apache to do so instead.
config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
# Disable serving static files from `public/`.
config.public_file_server.enabled = false

# Cache assets for far-future expiry since they are all digest stamped.
# config.public_file_server.headers = { "cache-control" => "public, max-age=#{1.year.to_i}" }
Expand Down

0 comments on commit 3496cce

Please sign in to comment.