1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-09 07:39:06 +00:00

Merge branch 'development'

This commit is contained in:
2018-01-31 09:17:18 -05:00

View File

@@ -21,7 +21,7 @@ class Mat < ActiveRecord::Base
end end
def assignNextMatch def assignNextMatch
t_matches = tournament.matches.select{|m| m.mat_id == nil && m.finished != 1} t_matches = tournament.matches.select{|m| m.mat_id == nil && m.finished != 1 && bout_number != nil}
if t_matches.size > 0 if t_matches.size > 0
match = t_matches.sort_by{|m| m.bout_number}.first match = t_matches.sort_by{|m| m.bout_number}.first
match.mat_id = self.id match.mat_id = self.id