From cda7e21d349d063617677abc1c936d4294606e77 Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Wed, 31 Jan 2018 09:31:03 -0500 Subject: [PATCH] Fixed typo to fix bug --- app/models/mat.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/mat.rb b/app/models/mat.rb index 819362f..59f3c9f 100644 --- a/app/models/mat.rb +++ b/app/models/mat.rb @@ -21,7 +21,7 @@ class Mat < ActiveRecord::Base end def assignNextMatch - t_matches = tournament.matches.select{|m| m.mat_id == nil && m.finished != 1 && bout_number != nil} + t_matches = tournament.matches.select{|m| m.mat_id == nil && m.finished != 1 && m.bout_number != nil} if t_matches.size > 0 match = t_matches.sort_by{|m| m.bout_number}.first match.mat_id = self.id