summaryrefslogtreecommitdiff
path: root/app/models/tournament_stage.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/tournament_stage.rb')
-rw-r--r--app/models/tournament_stage.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/tournament_stage.rb b/app/models/tournament_stage.rb
index 72aa14c..efb4d5c 100644
--- a/app/models/tournament_stage.rb
+++ b/app/models/tournament_stage.rb
@@ -12,6 +12,10 @@ class TournamentStage < ActiveRecord::Base
presence: true,
inclusion: {in: Tournament.new.seeding_methods})
+ def owned_by?(user)
+ self.tournament.owned_by?(user)
+ end
+
# A 1-indexed hash of matches
def matches_ordered
h = {}