diff options
author | tkimia <tkimia@purdue.edu> | 2014-04-29 16:45:01 -0400 |
---|---|---|
committer | tkimia <tkimia@purdue.edu> | 2014-04-29 16:45:01 -0400 |
commit | a3392e334f15dd852f550411394c27b3327db1e9 (patch) | |
tree | 46b67d2c5fd004d81b936e4d6a68f80f9cc8ff32 /app/models | |
parent | 42d6e3b1cc05ef5172081682b53675e4827254d3 (diff) | |
parent | d2da4866962e69fda4f3078afd19dbaf3d245882 (diff) |
Merge branch 'master' of https://github.com/LukeShu/leaguer
Conflicts:
app/models/match.rb
lib/scoring/winner_takes_all.rb
Diffstat (limited to 'app/models')
-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 65e2047..cdfa0d7 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| self.users.each do |user| ok &= statistics.where(match: self, user: user, name: stat) end @@ -87,7 +87,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 |