From 4f78b4eb0738b003e4ba6f96e0ddc3188f1d3d23 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 26 Mar 2018 22:11:38 +0100 Subject: Error on unpermitted strong parameters Unless running in the production environment. This helps with development as errors are caught earlier. --- config/initializers/strong_params.rb | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 config/initializers/strong_params.rb (limited to 'config') diff --git a/config/initializers/strong_params.rb b/config/initializers/strong_params.rb new file mode 100644 index 0000000..07415fe --- /dev/null +++ b/config/initializers/strong_params.rb @@ -0,0 +1,3 @@ +unless Rails.env.production? + ActionController::Parameters.action_on_unpermitted_parameters = :raise +end -- cgit v1.2.3