-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't mass-assign protected attributes: group_ids #16
Comments
I just fixed this bug. Please try again :-) |
I had this same issue but this fix did not work for me. I just added :group_ids to the attr_accessible list in app/models/user.rb and now I can create users... |
Actually, line 18 of the groups_controller.rb file that calls the set_groups function in the create method has the wrong number of arguments (0 for 1), so to get this totally working I needed to comment that out, too. |
@edwardsharp I don't think it's a good idea to just add :group_ids to the attr_accessible list. This may e.g. allow someone who is not an admin to add themselves to an admins group. I am doing this trough set_groups, so I can check that the user is allowed to update groups. Anyway, I fixed it in the create method too. Everything should be OK now. Thanks for your feedback! |
I just downloaded and installed the master branch of boxroom and everything runs fine except when I try to assign a group to a user. When I create a new group then go to edit the user and check a new group to add then click save, I get the following exception:
The text was updated successfully, but these errors were encountered: