Serialize array with strong_parameters

后端 未结 3 1399
感动是毒
感动是毒 2021-01-04 15:16

I am trying to save a array using the strong_parameters gem. But I am having issues with how the form is sending my array. The params look like this:

> pa         


        
3条回答
  •  青春惊慌失措
    2021-01-04 15:52

    Try using this:

    def circuit_params
      params.require(:circuit).permit(:title, :id, viewable_tasks:[], ... )
    end
    

提交回复
热议问题