RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: magicienap
Site: http://www.antoine-proulx.ca
With Rails 4 and strong parameters, if we want this to work, we have to add resource_ids: [] in the permit call. For example :
resource_ids: []
params[:user].permit(..., role_ids: [])
Am I right? It doesn't work if we just add :role_ids in the permit call, because it's an array and not a scalar.
With Rails 4 and strong parameters, if we want this to work, we have to add
resource_ids: []
in the permit call. For example :Am I right? It doesn't work if we just add :role_ids in the permit call, because it's an array and not a scalar.