Open
Description
Two different Rails params whitelists are marked as duplicates with a threshold of 23.
# Controller A
params.require(:model_a).permit(:name, :description, :automatic, other_model_ids: []).tap do |model_a_params|
model_a_params[:settings] = params[:model_a][:settings]
end
# Controller B
params[:model_b].permit(:happened_at, :other_model_id, :some_type, some_other_models_ids: [])
.tap { |whitelisted| whitelisted[:reason] = params[:model_b][:reason] }
There are some similarities, but this shouldn't be a duplication error.