Skip to content

Commit be50290

Browse files
etewiahclaude
andcommitted
Upgrade config.load_defaults from 5.2 to 8.0
Migrates Rails configuration defaults to match Rails 8.1 runtime. This enables modern security and performance features: - Same-site cookies and secure cookie metadata - belongs_to associations require presence by default - SHA256 for key derivation and HMAC - Query log tags for debugging - Regexp timeout (ReDoS protection) - Strict HTTP freshness checking Removes deprecated to_time_preserves_timezone setting (now default). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 4a94fa8 commit be50290

File tree

2 files changed

+3
-35
lines changed

2 files changed

+3
-35
lines changed

config/application.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,14 @@
2222

2323
module StandalonePwb
2424
class Application < Rails::Application
25-
# Initialize configuration defaults for originally generated Rails version.
26-
config.load_defaults 5.2
25+
# Initialize configuration defaults for Rails 8.0
26+
# Migrated from 5.2 - see config/initializers/new_framework_defaults_migration.rb
27+
config.load_defaults 8.0
2728

2829
# Enable gzip compression for all responses (HTML, CSS, JS, JSON)
2930
# This significantly reduces transfer sizes and improves page load times
3031
config.middleware.use Rack::Deflater
3132

32-
# Opt in to Rails 8.1 timezone behavior
33-
config.active_support.to_time_preserves_timezone = :zone
34-
3533
# Please, add to the `ignore` list any other `lib` subdirectories that do
3634
# not contain `.rb` files, or that should not be reloaded or eager loaded.
3735
# Common ones are `templates`, `generators`, or `middleware`, for example.

config/initializers/new_framework_defaults_8_0.rb

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)