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

Fixed tournament error bug

This commit is contained in:
2016-01-20 16:10:41 +00:00
parent 3db55aec1e
commit bd3c29bd60
2 changed files with 6 additions and 5 deletions

View File

@@ -112,7 +112,12 @@ class Tournament < ActiveRecord::Base
def poolToBracketWeightsWithTooManyWrestlers
if self.tournament_type == "Pool to bracket"
weights.select{|w| w.wrestlers.size > 16}
weightsWithTooManyWrestlers = weights.select{|w| w.wrestlers.size > 16}
if weightsWithTooManyWrestlers.size < 1
return nil
else
return weightsWithTooManyWrestlers
end
else
nil
end