diff options
author | tkimia <tkimia@purdue.edu> | 2014-04-29 16:58:08 -0400 |
---|---|---|
committer | tkimia <tkimia@purdue.edu> | 2014-04-29 16:58:08 -0400 |
commit | a9d074228774e868ccfc0579813827147c4ed876 (patch) | |
tree | c213e06f1645e5d1b72a09c6221a92a721d5aac7 /app | |
parent | a3392e334f15dd852f550411394c27b3327db1e9 (diff) |
winner problem fixed in elimination
Diffstat (limited to 'app')
-rw-r--r-- | app/models/match.rb | 4 |
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 |