Skip to content

Load Rails 6.1 framework defaults

Heinrich Lee Yu requested to merge 332288-load-rails-6-1-defaults into master

What does this MR do and why?

This adds config.load_defaults 6.1 and then overrides some of the settings so that we keep existing behavior.

This is the first step for #332288 (closed) and should not change any behavior. This just makes it easier to see which settings we haven't adopted.

The defaults are documented in https://guides.rubyonrails.org/configuring.html#results-of-config-load-defaults

Notes

  1. Settings for active_storage and action_mailbox are untouched since we don't load these gems. Setting these to the old defaults would raise an exception.

  2. For settings where we manually configured to follow the new defaults, I removed those lines since we don't need them anymore.

  3. config.action_view.form_with_generates_remote_forms was defaulted to true in Rails 5.1 and then defaulted back to false in Rails 6.1. Since we never switched to the 5.1 default, we're already on the latest default so no need to include this in the initializer.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #332288 (closed)

Edited by Heinrich Lee Yu

Merge request reports

Loading