summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortkimia <tkimia@purdue.edu>2014-04-29 16:58:08 -0400
committertkimia <tkimia@purdue.edu>2014-04-29 16:58:08 -0400
commita9d074228774e868ccfc0579813827147c4ed876 (patch)
treec213e06f1645e5d1b72a09c6221a92a721d5aac7
parenta3392e334f15dd852f550411394c27b3327db1e9 (diff)
winner problem fixed in elimination
-rw-r--r--app/models/match.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/match.rb b/app/models/match.rb
index cdfa0d7..e8174ce 100644
--- a/app/models/match.rb
+++ b/app/models/match.rb
@@ -19,9 +19,9 @@ class Match < ActiveRecord::Base
# such that the match may be considered finished.
def finished?
ok = true
- tournament_stage.scoring.stats_needed(self).each do |stat|
+ self.tournament_stage.scoring.stats_needed(self).each do |stat|
self.users.each do |user|
- ok &= statistics.where(match: self, user: user, name: stat)
+ ok &= self.statistics.where(user: user, name: stat).first
end
end
ok