Add missing defaults to new_framework_defaults

These were added in cdce275, 5d0c2b0, and 5256c90

For the new MessageVerifier and MessageEncryptor defaults, I modeled the
documentation after cb76ede. The goal is to warn users that they should
pay attention to the config and not just uncomment it without doing
additional work.

I also added an extra note to log_file_size since it is the first
load_default I'm aware of that is environment dependent.

Co-authored-by: Jonathan Hefner <jonathan@hefner.pro>
This commit is contained in:
Hartley McGuire 2022-10-26 20:28:35 -04:00
parent 1d0e9d261e
commit f822fc6db1
No known key found for this signature in database
GPG Key ID: E823FC1403858A82
1 changed files with 39 additions and 0 deletions

View File

@ -68,3 +68,42 @@
# (https://open-telemetry.github.io/opentelemetry-sqlcommenter/), or using the legacy format.
# Options are `:legacy` and `:sqlcommenter`.
# Rails.application.config.active_record.query_log_tags_format = :sqlcommenter
# Specify the serializer used by `MessageEncryptor` by default.
# Options are `:json`, `:hybrid`, and `:marshal`.
#
# New apps by default will use `:json`.
#
# Rails.application.config.active_support.default_message_encryptor_serializer = :json
#
# However, if you are upgrading an app, you will likely want to start with
# `:hybrid`. If you switch to `:json` before existing messages have expired or
# been converted, those messages will no longer be readable.
#
# Rails.application.config.active_support.default_message_encryptor_serializer = :hybrid
#
# For detailed migration steps, check out https://guides.rubyonrails.org/v7.1/upgrading_ruby_on_rails.html#new-activesupport-messageencryptor-default-serializer
# Specify the serializer used by `MessageVerifier` by default.
# Options are `:json`, `:hybrid`, and `:marshal`.
#
# New apps by default will use `:json`.
#
# Rails.application.config.active_support.default_message_verifier_serializer = :json
#
# However, if you are upgrading an app, you will likely want to start with
# `:hybrid`. If you switch to `:json` before existing messages have expired or
# been converted, those messages will no longer be readable.
#
# Rails.application.config.active_support.default_message_verifier_serializer = :hybrid
#
# For detailed migration steps, check out https://guides.rubyonrails.org/v7.1/upgrading_ruby_on_rails.html#new-activesupport-messageverifier-default-serializer
# Set the maximum size for Rails log files.
#
# `load_defaults 7.1` does not set this value for environments other than
# development and test.
#
# if Rails.env.development? || Rails.env.test?
# Rails.application.config.log_file_size = 100 * 1024 * 1024
# end