RailsCasts Pro episodes are now free!

Learn more or hide this

Antoine Proulx's Profile

GitHub User: magicienap

Site: http://www.antoine-proulx.ca

Comments by Antoine Proulx

Avatar

With Rails 4 and strong parameters, if we want this to work, we have to add resource_ids: [] in the permit call. For example :

ruby
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.