-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle edgecase where a user cannot have all roles removed.
When updating a user, I cannot remove the last role from that user. This is due to an assumption that was made that the form still submitted the param `spree_role_ids` with an empty array if none of the checkboxes were checked. This assumption was false. We have to add behavior around whether or not the roles can be cleared if that parameter is not present which is not ideal as explained in the comment in users_controller#set_roles.
- Loading branch information
Showing
2 changed files
with
38 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters