summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorAndrewMurrell <amurrel@purdue.edu>2014-04-28 18:29:01 -0400
committerAndrewMurrell <amurrel@purdue.edu>2014-04-28 18:29:01 -0400
commitcd19b2591a52ac604632a70929448ee5e78c2568 (patch)
tree78be624ead45a8b85669f03a04e519a98a283693 /app/models
parent5a7f5f6bc00d2abe2d5cd71363d4d5116bf4de51 (diff)
Misc fixes. (This commit is from Luke on Andrew's box)
Diffstat (limited to 'app/models')
-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