1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Mat assignment fix did not work

This commit is contained in:
2016-01-06 15:42:00 +00:00
parent 7d092c3d35
commit eb9037b078

View File

@@ -69,7 +69,7 @@ class Tournament < ActiveRecord::Base
def assignMats(matsToAssign)
if matsToAssign.count > 0
until matsToAssign.sort_by{|m| m.id}.last.unfinishedMatches.count == 4
until matsToAssign.sort_by{|m| m.id}.last.matches.count == 4
matsToAssign.sort_by{|m| m.id}.each do |m|
m.assignNextMatch
end