Upgrade to Rails 7.0
The config.file_watcher option still exists but it's no longer included in the default environtment file. Since we don't use it, we're removing it. The config.assets.assets.debug option is no longer true by default [1], so it isn't included anymore. The config.active_support.deprecation option is now omitted on production in favor of config.active_support.report_deprecations, which is false by default. I think it's OK to keep it this way, since we check deprecations in the development and test environments but never on production environments. As mentioned in the Rails upgrade guide, sprockets-rails is no longer a rails dependency and we need to explicitly include it in our Gemfile. The behavior of queries trying to find an invalid enum value has changed [2], so we're updating the tests accordingly. The `favicon_link_tag` method has removed the deprecated `shortcut` link type [3], so we're updating the tests accordingly. The method `raw_filter` in ActiveSupport callbacks has been renamed to `filter` [4], so we're updating the code accordingly. [1] https://github.com/rails/rails/commit/adec7e7ba87e3 [2] https://github.com/rails/rails/commit/b68f0954 [3] Pull request 43850 in https://github.com/rails/rails [4] Pull request 41598 in https://github.com/rails/rails
This commit is contained in:
@@ -74,18 +74,13 @@ Rails.application.configure do
|
||||
config.action_mailer.smtp_settings = Rails.application.secrets.smtp_settings
|
||||
end
|
||||
|
||||
# Disable locale fallbacks for I18n
|
||||
# (prevents using fallback locales set in application.rb).
|
||||
# config.i18n.fallbacks = false
|
||||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
||||
# the I18n.default_locale when a translation cannot be found).
|
||||
# (commented because it prevents using fallback locales set in application.rb).
|
||||
# config.i18n.fallbacks = true
|
||||
|
||||
# Send deprecation notices to registered listeners.
|
||||
config.active_support.deprecation = :notify
|
||||
|
||||
# Log disallowed deprecations.
|
||||
config.active_support.disallowed_deprecation = :log
|
||||
|
||||
# Tell Active Support which deprecation messages to disallow.
|
||||
config.active_support.disallowed_deprecation_warnings = []
|
||||
# Don't log any deprecations.
|
||||
config.active_support.report_deprecations = false
|
||||
|
||||
# Use default logging formatter so that PID and timestamp are not suppressed.
|
||||
config.log_formatter = ::Logger::Formatter.new
|
||||
@@ -107,27 +102,6 @@ Rails.application.configure do
|
||||
|
||||
# Do not dump schema after migrations.
|
||||
config.active_record.dump_schema_after_migration = false
|
||||
|
||||
# Inserts middleware to perform automatic connection switching.
|
||||
# The `database_selector` hash is used to pass options to the DatabaseSelector
|
||||
# middleware. The `delay` is used to determine how long to wait after a write
|
||||
# to send a subsequent read to the primary.
|
||||
#
|
||||
# The `database_resolver` class is used by the middleware to determine which
|
||||
# database is appropriate to use based on the time delay.
|
||||
#
|
||||
# The `database_resolver_context` class is used by the middleware to set
|
||||
# timestamps for the last write to the primary. The resolver uses the context
|
||||
# class timestamps to determine how long to wait before reading from the
|
||||
# replica.
|
||||
#
|
||||
# By default Rails will store a last write timestamp in the session. The
|
||||
# DatabaseSelector middleware is designed as such you can define your own
|
||||
# strategy for connection switching and pass that into the middleware through
|
||||
# these configuration options.
|
||||
# config.active_record.database_selector = { delay: 2.seconds }
|
||||
# config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
|
||||
# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
|
||||
end
|
||||
|
||||
require Rails.root.join("config", "environments", "custom", "production")
|
||||
|
||||
Reference in New Issue
Block a user