Rails Framework Defaults

Since Rails 5, Rails introduced something call Framework Defaults ✨.
Which will allow you run your Rails app in newer version while
keeping your application on older configurations. To make upgrade your Rails easier. You can delay opt-in to new framework default configurations later.

When you bump the Rails version, run the recommended update task bin/rails app:update, will add a a load_defaults line to your config/application.rb:

module JuanitoFatas
  class Application < Rails::Application
    config.load_defaults 6.0

And Rails will generate a file depends on which Rails version you upgrade to:

These files will contain all the defaults configurations for its respective Rails version. You can find what the new defaults are for each Rails version at: lib/rails/application/configuration.rb and these framework defaults file turn them off by default so it does not break your app.

It is possible you have an application on Rails 7.0 and load 6.0 defaults. You can find what does each configuration do at Configuring Rails Applications Guide.

You can study the default and change each configuration to what makes sense for your application. One PR at a time. And delete the framework defaults file once you’ve flipped all configurations.