I have multiple check boxes from a many to many relationship, And i'm trying to validate them so that none of the fields need a value to continue. At the moment if i try to create a user without assigning them to a group/role through the checkboxes i get
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.each
Also when a group is assigned but all other fields are left empty i still get the above error.
When everything has a value it works perfectly.
Form below