Skip to content

Commit e4eec5c

Browse files
committed
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. [...] ```
1 parent e019ada commit e4eec5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/api/base_controller/logger.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def log_api_request
3333
return unless api_log_info?
3434
log_request("Request", @req.to_hash)
3535
unfiltered_params = request.query_parameters
36-
.merge(params.permit(:action, :controller, :format).to_h)
36+
.merge(params.slice(:action, :controller, :format).permit!)
3737
.merge("body" => @req.json_body)
3838
log_request("Parameters", @parameter_filter.filter(unfiltered_params))
3939
log_request_body

0 commit comments

Comments
 (0)