Skip to content

Commit 3496cce

Browse files
authored
Merge pull request #3528 from alphagov/some-config-updates-following-rails-8-upgrade
Update some more config following Rails 8 upgrade
2 parents 81efb36 + b2800ca commit 3496cce

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

config/environments/development.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,14 @@
2020
if Rails.root.join("tmp/caching-dev.txt").exist?
2121
config.action_controller.perform_caching = true
2222
config.action_controller.enable_fragment_cache_logging = true
23-
24-
config.cache_store = :memory_store
2523
config.public_file_server.headers = { "cache-control" => "public, max-age=#{2.days.to_i}" }
2624
else
2725
config.action_controller.perform_caching = false
28-
29-
config.cache_store = :null_store
3026
end
3127

28+
# Change to :null_store to avoid any caching.
29+
config.cache_store = :memory_store
30+
3231
# Don't care if the mailer can't send.
3332
config.action_mailer.raise_delivery_errors = false
3433

@@ -63,7 +62,7 @@
6362
config.active_record.verbose_query_logs = true
6463

6564
# Append comments with runtime information tags to SQL queries in logs.
66-
# config.active_record.query_log_tags_enabled = true
65+
config.active_record.query_log_tags_enabled = true
6766

6867
# Highlight code that enqueued background job in logs.
6968
config.active_job.verbose_enqueue_logs = true

config/environments/production.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
# Turn on fragment caching in view templates.
1616
config.action_controller.perform_caching = true
1717

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

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

0 commit comments

Comments
 (0)