From a528cedd36c77487496147b5880205799dbcb242 Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Mon, 28 Apr 2014 15:03:50 -0400 Subject: I fixed it. added self and fixed variable names. --- app/models/match.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/models/match.rb b/app/models/match.rb index 1127598..4c7acbf 100644 --- a/app/models/match.rb +++ b/app/models/match.rb @@ -56,7 +56,7 @@ class Match < ActiveRecord::Base needed = self.tournament_stage.scoring.stats_needed methods_names = self.tournament_stage.tournament.sampling_methods methods_names.each do |method_name| - method_class = "Sampling::#{sampling_name.camelcase}".constantize + method_class = "Sampling::#{method_name.camelcase}".constantize needed.each do |stat| data[stat] ||= {} data[stat][method] = method_class.can_get?(user, stat) -- cgit v1.2.3