I have a functioning Rails 3 app that uses has_many :through associations which is not, as I remake it as a Rails 4 app, letting me save ids from the associated model in the
If you want to permit an array of hashes(or an array of objects
from the perspective of JSON)
params.permit(:foo, array: [:key1, :key2])
2 points to notice here:
array
should be the last argument of the permit
method.Unpermitted parameter: array
, which is very difficult to debug in this case.