Unpermitted parameters despite whitelisting attribute rails 4
<p>I have an attribute :completed, that is a boolean value (true/false). On the index page, I have a check box that I would like to, when checked, update that value for the object. Here is what I have for the check box:</p>

<pre><code>&lt;div class="task_area"&gt;
      &lt;%= link_to task.title, task_path(task), class: 'wrapper_task_name'%&gt;
      &lt;%= form_for task do |f| %&gt;
        &lt;%= f.check_box :completed %&gt;
        &lt;%= f.submit 'update' %&gt;
      &lt;% end %&gt;
&lt;/div&gt;
</code></pre>

<p>I whitelisted the attribute :completed in my tasks_controller.rb:</p>

<pre><code>def task_params
    params.require(:task).permit(:title, :text, :boolean, :current_user, :email, )
end 
</code></pre>

<p>But in the log I get:</p>

<pre><code>Started PATCH "/tasks/45" for ::1 at 2016-10-16 17:35:43 -0400
Processing by TasksController#update as HTML
  Parameters: {"utf8"=&gt;"���", "authenticity_token"=&gt;"ogAki1fvq6Eq+ONwjxeYwf+ZOrmkv+EAuDmZRTEEJ05xB3cf/XyHEavNDZyBWUOL0gUuEOglyM2uDNoJHcDcJg==", "task"=&gt;{"completed"=&gt;"1"}, "commit"=&gt;"update", "id"=&gt;"45"}
  User Load (0.8ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = $1  ORDER BY "users"."id" ASC LIMIT 1  [["id", 1]]
  Task Load (0.7ms)  SELECT  "tasks".* FROM "tasks" WHERE "tasks"."user_id" = $1 AND "tasks"."id" = $2 LIMIT 1  [["user_id", "1"], ["id", 45]]
Unpermitted parameter: completed
   (0.4ms)  BEGIN
   (0.4ms)  COMMIT
Redirected to http://localhost:3000/
Completed 302 Found in 22ms (ActiveRecord: 2.3ms)
</code></pre>

<p>I'm wondering if having devise require user authentication is causing this problem. Does anyone have any idea as to what I can do to fix this?</p>