summaryrefslogtreecommitdiff
path: root/app/models/match.rb
diff options
context:
space:
mode:
authornfoy <nfoy@purdue.edu>2014-04-28 19:39:36 -0400
committernfoy <nfoy@purdue.edu>2014-04-28 19:39:36 -0400
commit87530c5bca7062ed18badf98bcb4b63529607ecd (patch)
tree29f2da66af99fbf05726ae9f4fa4bd78d910a763 /app/models/match.rb
parent3a4412f08bed438ebf14f6cdfa5bb6eb4d239138 (diff)
parent8dade78c49ad03085166c41d8b334a6ade3a287e (diff)
Merge branch 'master' of https://github.com/LukeShu/leaguer
Diffstat (limited to 'app/models/match.rb')
-rw-r--r--app/models/match.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/app/models/match.rb b/app/models/match.rb
index 4c7acbf..219e662 100644
--- a/app/models/match.rb
+++ b/app/models/match.rb
@@ -5,9 +5,6 @@ class Match < ActiveRecord::Base
belongs_to :winner, class_name: "Team"
- def setup()
- end
-
def finished?
ok = true
tournament_stage.scoring_method.stats_needed.each do |stat|
@@ -59,7 +56,7 @@ class Match < ActiveRecord::Base
method_class = "Sampling::#{method_name.camelcase}".constantize
needed.each do |stat|
data[stat] ||= {}
- data[stat][method] = method_class.can_get?(user, stat)
+ data[stat][method_class] = method_class.can_get?(stat)
end
end
@@ -83,7 +80,7 @@ class Match < ActiveRecord::Base
if @method_classes.nil?
data = Set.new
figure_sampling_methods.each do |stat,method|
- data.push(method)
+ data.add(method)
end
@method_classes = data
end