Upgrade to Rails 7.1
We're disabling `action_controller.raise_on_missing_callback_actions` because sometimes we include `before_action :something, only: actions` in concerns, and we include these concerns in controllers that don't have all these actions. Note that Rails 7.1 logs to STDOUT by default [1]; we're re-adding the condition `if ENV["RAILS_LOG_TO_STDOUT"].present?` because we're still using files and we're rotating the logs to avoid running out of space. Also note that the GraphQL controller test (which is actually a request test, since it's got `type: :request`) that was raising an exception no longer does it thanks to the new default value for the `config.action_dispatch.show_exceptions` configuration option. So we're updating the test accordingly. This option doesn't affect regular controller tests (without the `type: :request` option), so in other tests we're still checking exceptions. [1] Pull request 47138 in https://github.com/rails/rails
This commit is contained in:
@@ -15,12 +15,13 @@ Rails.application.configure do
|
||||
config.i18n.default_locale = :en
|
||||
config.i18n.available_locales = %w[de en es fr nl pt-BR zh-CN]
|
||||
|
||||
# Turn false under Spring and add config.action_view.cache_template_loading = true.
|
||||
config.cache_classes = true
|
||||
# While tests run files are not watched, reloading is not necessary.
|
||||
config.enable_reloading = false
|
||||
|
||||
# Eager loading loads your whole application. When running a single test locally,
|
||||
# this probably isn't necessary. It's a good idea to do in a continuous integration
|
||||
# system, or in some way before deploying your code.
|
||||
# Eager loading loads your entire application. When running a single test locally,
|
||||
# this is usually not necessary, and can slow down your test suite. However, it's
|
||||
# recommended that you enable it in continuous integration systems to ensure eager
|
||||
# loading is working properly before deploying your code.
|
||||
config.eager_load = ENV["CI"].present?
|
||||
|
||||
# Configure public file server for tests with Cache-Control for performance.
|
||||
@@ -30,12 +31,12 @@ Rails.application.configure do
|
||||
}
|
||||
|
||||
# Show full error reports and disable caching.
|
||||
config.consider_all_requests_local = true
|
||||
config.consider_all_requests_local = true
|
||||
config.action_controller.perform_caching = false
|
||||
config.cache_store = :null_store
|
||||
|
||||
# Raise exceptions instead of rendering exception templates.
|
||||
config.action_dispatch.show_exceptions = false
|
||||
# Render exception templates for rescuable exceptions and raise for other exceptions.
|
||||
config.action_dispatch.show_exceptions = :rescuable
|
||||
|
||||
# Disable request forgery protection in test environment.
|
||||
config.action_controller.allow_forgery_protection = false
|
||||
@@ -72,6 +73,9 @@ Rails.application.configure do
|
||||
logger.formatter = config.log_formatter
|
||||
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
||||
|
||||
# Raise error when a before_action's only/except options reference missing actions
|
||||
# config.action_controller.raise_on_missing_callback_actions = true
|
||||
|
||||
# Allow managing different tenants using the same application
|
||||
config.multitenancy = true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user