From 5ecd65b7dcfdea0c9a16729ad1e5fcc52f72f715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Mon, 15 Apr 2024 16:06:31 +0200 Subject: [PATCH] Precompile filter parameters This is done for performance reasons. Quoting the pull request introducing this option [1]: > A config might be overkill, but I wanted to provide an escape hatch > for any upgraded apps that might be testing the exact value of the > action_dispatch.parameter_filter header. Since we don't test the exact value of action_dispatch.parameter_filter, we can enable this option. [1] Pull request 46452 in https://github.com/rails/rails --- config/initializers/new_framework_defaults_7_1.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/new_framework_defaults_7_1.rb b/config/initializers/new_framework_defaults_7_1.rb index 9c52f5dfc..284ac2262 100644 --- a/config/initializers/new_framework_defaults_7_1.rb +++ b/config/initializers/new_framework_defaults_7_1.rb @@ -171,7 +171,7 @@ Rails.application.config.active_record.belongs_to_required_validates_foreign_key # Enable precompilation of `config.filter_parameters`. Precompilation can # improve filtering performance, depending on the quantity and types of filters. #++ -# Rails.application.config.precompile_filter_parameters = true +Rails.application.config.precompile_filter_parameters = true ### # Enable before_committed! callbacks on all enrolled records in a transaction.