diff options
author | Luke Shumaker <shumakl@purdue.edu> | 2014-04-29 16:42:07 -0400 |
---|---|---|
committer | Luke Shumaker <shumakl@purdue.edu> | 2014-04-29 16:42:07 -0400 |
commit | d2da4866962e69fda4f3078afd19dbaf3d245882 (patch) | |
tree | ffe6b5f4453761b5cbc74bbc5db5c14ac30de345 /app/models/match.rb | |
parent | 30445bb10809969ec5a006e7d2ca6f581168cf72 (diff) | |
parent | 8e94460ca7d5e17983778e0ae83f85ee40557cda (diff) |
Merge branch 'master' of https://github.com/LukeShu/leaguer
Diffstat (limited to 'app/models/match.rb')
-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 7b36777..1359695 100644 --- a/app/models/match.rb +++ b/app/models/match.rb @@ -19,7 +19,7 @@ class Match < ActiveRecord::Base # such that the match may be considered finished. def finished? ok = true - tournament_stage.scoring.stats_needed.each do |stat| + tournament_stage.scoring.stats_needed(self).each do |stat| ok &= !statistics.where(match: self, name: stat).nil? end ok @@ -80,7 +80,7 @@ class Match < ActiveRecord::Base def figure_sampling_methods if @sampling_methods.nil? data = {} - needed = self.tournament_stage.scoring.stats_needed + needed = self.tournament_stage.scoring.stats_needed(self) methods_names = self.tournament_stage.tournament.sampling_methods methods_names.each do |method_name| method_class = "Sampling::#{method_name.camelcase}".constantize |