From 8db5113a761d443374a64e5e9fe877fafa3f0a50 Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Mon, 28 Apr 2014 21:21:47 -0400 Subject: Fixed status 2-3 transition and statistic sampling. --- app/models/match.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/models/match.rb') diff --git a/app/models/match.rb b/app/models/match.rb index 219e662..5c3a022 100644 --- a/app/models/match.rb +++ b/app/models/match.rb @@ -7,8 +7,8 @@ class Match < ActiveRecord::Base def finished? ok = true - tournament_stage.scoring_method.stats_needed.each do |stat| - ok &= statistics.where(match: self, name: stat).nil? + tournament_stage.scoring.stats_needed.each do |stat| + ok &= !statistics.where(match: self, name: stat).nil? end ok end -- cgit v1.2.3