You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The health_check gem causes ActionController::Base to be loaded too early in the Rails initialization process. This causes some initializers to be loaded after ActionController::Base is loaded, which in turn means that the configurations are not applied as expected.
For example, when a Rails app is upgraded from 6.1 to 7.0, a new_framework_defaults_7_0.rb is created to configure the new framework defaults for the new version one by one. (Source code)
One of these configurations is:
# Enable parameter wrapping for JSON.
# Previously this was set in an initializer. It's fine to keep using that initializer if you've customized it.
# To disable parameter wrapping entirely, set this config to `false`.
Rails.application.config.action_controller.wrap_parameters_by_default = true
If the health_check gem is included in the project, then setting this configuration to true has no effect.
This issue is describe in detail in this Github issue in the rails repo.
Problem
The health_check gem causes
ActionController::Base
to be loaded too early in the Rails initialization process. This causes some initializers to be loaded afterActionController::Base
is loaded, which in turn means that the configurations are not applied as expected.For example, when a Rails app is upgraded from 6.1 to 7.0, a new_framework_defaults_7_0.rb is created to configure the new framework defaults for the new version one by one. (Source code)
One of these configurations is:
If the health_check gem is included in the project, then setting this configuration to true has no effect.
This issue is describe in detail in this Github issue in the rails repo.
This section of the Rails documentation describes how to correctly load Rails modules in third party engines / libraries.
The text was updated successfully, but these errors were encountered: