Serialize array with strong_parameters

后端 未结 3 1393
感动是毒
感动是毒 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 16:01

    I just had the same issue and this was the correct syntax:

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

提交回复
热议问题