New Unpermitted Parameters error
I am all of a sudden getting a bomb out when I was changing some code around. Looks fine to me
Error
Error
Unpermitted parameters: :instructor_pic, :logo. Context: { controller: ProgramsController, action: update, request: #<ActionDispatch::Request:0x000000011a3a17c0>, params: {"_method"=>"patch", "authenticity_token"=>"SmU1pYqeAFAA3QTK6_U5GcG0olUWpUCvElAIT-xHT9dYrhfYKSzCz_NlW6ub_f5uKBx_bugP7q5rtTUlUXj9Tw", "program"=>{"name"=>"[FILTERED]", "description"=>"gfgfg", "enrolling"=>"0", "instructor"=>"gfgfg", "instructor_pic"=>["", "eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBGdz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--4f11b5bb5999bce3b8150204aef07a9788089b84"], "logo"=>["", "eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBHQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--8fd85dad40df530066f531ac1329f6330848f22d"]}, "controller"=>"programs", "action"=>"update", "id"=>"3"} }
Controller
def program_params params.require(:program).permit(:name, :description, :enrolling, :instructor, :instructor_pic, :logo, :image) # Uncomment to use Pundit permitted attributes # params.require(:program).permit(policy(@program).permitted_attributes) end
Notifications
You’re not receiving notifications from this thread.