diff options
Diffstat (limited to 'app/models/member_role.rb')
-rw-r--r-- | app/models/member_role.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/member_role.rb b/app/models/member_role.rb index 8354b410f..a2c84020d 100644 --- a/app/models/member_role.rb +++ b/app/models/member_role.rb @@ -25,8 +25,9 @@ class MemberRole < ActiveRecord::Base after_destroy :remove_role_from_group_users validates_presence_of :role + validate :validate_role_member - def validate + def validate_role_member errors.add :role_id, :invalid if role && !role.member? end |