From e4eec5cfa39e19e7341fce32886d08f9eb7627b8 Mon Sep 17 00:00:00 2001 From: Keenan Brock Date: Tue, 28 Oct 2025 23:03:45 -0400 Subject: [PATCH] Remove unpermitted parameters warning We always pass a few parameters. these parameters come from query_parameters. These were triggering a warning in our logging. Rails adds parameters from routes and actionpack. like :c_id, :s_id, :action, :controller, :format We only care about a few of these. So only outputting the ones we care about and ignoring the rest ``` [----] D, [2025-10-28T23:00:25.289277#13035:5200] DEBUG -- : Unpermitted parameters: :expand, :attributes, :c_id. [...] ``` --- app/controllers/api/base_controller/logger.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/base_controller/logger.rb b/app/controllers/api/base_controller/logger.rb index b1b1ce7a00..41d835b630 100644 --- a/app/controllers/api/base_controller/logger.rb +++ b/app/controllers/api/base_controller/logger.rb @@ -33,7 +33,7 @@ def log_api_request return unless api_log_info? log_request("Request", @req.to_hash) unfiltered_params = request.query_parameters - .merge(params.permit(:action, :controller, :format).to_h) + .merge(params.slice(:action, :controller, :format).permit!) .merge("body" => @req.json_body) log_request("Parameters", @parameter_filter.filter(unfiltered_params)) log_request_body