summaryrefslogtreecommitdiff
path: root/app/models/match.rb
diff options
context:
space:
mode:
authorLuke Shumaker <shumakl@purdue.edu>2014-04-30 15:38:26 -0400
committerLuke Shumaker <shumakl@purdue.edu>2014-04-30 15:38:26 -0400
commit47bb545740937d50b72e0d1c420fcba4e64d6760 (patch)
tree886e361d01b1cdab7d3e8afed40eb76c6791ddfb /app/models/match.rb
parentf1b2a1f25b839237ff1791ffc4586bc466409874 (diff)
Add #owned_by? to the models that didn't have it (when appropriate)
Diffstat (limited to 'app/models/match.rb')
-rw-r--r--app/models/match.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/match.rb b/app/models/match.rb
index ed21f78..f1c32fe 100644
--- a/app/models/match.rb
+++ b/app/models/match.rb
@@ -14,6 +14,10 @@ class Match < ActiveRecord::Base
# winner:references
# not validated
+ def owned_by?(user)
+ self.tournament_stage.owned_by?(user)
+ end
+
##
# Returns whether or not all the statistics have been collected
# such that the match may be considered finished.