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
Try using this:
def circuit_params
params.require(:circuit).permit(:title, :id, viewable_tasks:[], ... )
end
the serialized items must be in the end of the permit parameters. In my experience (and i dont know exactly why), you cannot input another unserialized item after a serialized one... try and let us know.
I just had the same issue and this was the correct syntax:
def circuit_params
params.require(:circuit).permit(:title, :id, {:viewable_tasks => []}, ... )
end