summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAndrewMurrell <amurrel@purdue.edu>2014-04-29 16:11:57 -0400
committerAndrewMurrell <amurrel@purdue.edu>2014-04-29 16:11:57 -0400
commiteed512268e4e0a0b7c5f9dddd6e36773fbee6bad (patch)
treed806a402c3379e9fd1357d2e72620d10c9c1f4f1 /app
parent577f203243b1ac914a3ee3f4635005be06d637c6 (diff)
scoring accepts matches
Diffstat (limited to 'app')
-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 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