diff options
Diffstat (limited to 'app/models/team.rb')
-rw-r--r-- | app/models/team.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/team.rb b/app/models/team.rb index 828d168..90981da 100644 --- a/app/models/team.rb +++ b/app/models/team.rb @@ -3,4 +3,8 @@ class Team < ActiveRecord::Base has_and_belongs_to_many :users alias_attribute :players, :users + + def owned_by?(user) + self.users.include?(user) + end end |