From 6ba77de65c82175a68f4eddeeec1986573f7a1c7 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Sun, 25 Aug 2024 12:22:58 +0200 Subject: [PATCH] Raise on unpermitted parameters in dev and test env This setting should ensure we don't re-introduce any code that silently "accepts" unpermitted parameters. --- config/environments/development.rb | 3 +++ config/environments/test.rb | 3 +++ 2 files changed, 6 insertions(+) diff --git a/config/environments/development.rb b/config/environments/development.rb index 63e9b3387..281b8265a 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -91,6 +91,9 @@ # Raises error for missing translations. config.i18n.raise_on_missing_translations = true + # Raises error for unpermitted parameters (default is `:log`). + config.action_controller.action_on_unpermitted_parameters = :raise + # Annotate rendered view with file names. config.action_view.annotate_rendered_view_with_filenames = true diff --git a/config/environments/test.rb b/config/environments/test.rb index 688ff0752..1b9f17aa0 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -71,6 +71,9 @@ # Raises error for missing translations. config.i18n.raise_on_missing_translations = true + # Raises error for unpermitted parameters (default is `:log`). + config.action_controller.action_on_unpermitted_parameters = :raise + # Annotate rendered view with file names. config.action_view.annotate_rendered_view_with_filenames = true