Class: SimpleTeams::Team

Inherits:
ApplicationRecord show all
Defined in:
app/models/simple_teams/team.rb

Instance Method Summary collapse

Instance Method Details

#membership_for(member) ⇒ Object



14
15
16
# File 'app/models/simple_teams/team.rb', line 14

def membership_for(member)
  memberships.find_by(:member_id => member.id)
end

#remove_member(member) ⇒ Object



18
19
20
# File 'app/models/simple_teams/team.rb', line 18

def remove_member(member)
  memberships.find_by(:member_id => member.id).destroy
end