Unpermitted parameters in rails 4
I read about collection_check_boxes but I don't understand how can I set the checked values. I have the following model: class Objective < ActiveRecord::Base has_many :indicators has_many :objective_children, class_name: "Objective", foreign_key: "parent_id" def objective_ids objective_children.collect{|o| o.id} end def objective_ids= objectives_ids objectives_ids.each do |id| objective_children << Objective.find(id) end end end edit view: <%= form_for(@objective) do |f| %> <%= f.collection_check_boxes :objective_ids, Objective.all, :id, :name %> <%= f.submit %> <% end %> the html checkbox are