Skip to content

Commit

Permalink
Reject unnecessary params to avoid warning in tasks_controller
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianna-chang-shopify committed May 19, 2021
1 parent a7140e5 commit de9a283
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/controllers/maintenance_tasks/tasks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ def run
private

def task_params
params.permit(:id, :csv_file, task_params: {})
params_to_exclude = ["_method", "commit", "authenticity_token"]
params.reject { |param| params_to_exclude.include?(param) }
.permit(:id, :csv_file, task_params: {})
end

def set_refresh
Expand Down

0 comments on commit de9a283

Please sign in to comment.