Closed blairanderson closed 6 years ago
@blairanderson you want to add users with a membership type, right?
user.named_groups.add "rails", as: :admin
user.named_groups.add "rails", as: :collaborator
user.named_groups.add "javascript", as: :admin
user.named_groups.add "javascript", as: :collaborator
You can do any or all of the above.
The answer here is correct. There is nothing preventing you from putting the wrong group name in. It's up to your application to validate / whitelist group names.
Hi there!
Happy to close this issue if groupify doesn't handle but i figured this was pretty darn perfect.
My use-case:
User should be able to create a 2 teams named "rails" and "javascript". User should be able to be members of both as
:admin
or as a:collaborator
I see group name on the membership model but not sure how to prevents putting incorrect names on memberships.