mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Reload tournament matches so generateweight moves finals to the last round as well
This commit is contained in:
@@ -54,7 +54,7 @@ class GenerateTournamentMatches
|
||||
|
||||
def moveFinalsMatchesToLastRound
|
||||
finalsRound = @tournament.totalRounds
|
||||
finalsMatches = @tournament.matches.select{|m| m.bracket_position == "1/2" || m.bracket_position == "3/4" || m.bracket_position == "5/6" || m.bracket_position == "7/8"}
|
||||
finalsMatches = @tournament.matches.reload.select{|m| m.bracket_position == "1/2" || m.bracket_position == "3/4" || m.bracket_position == "5/6" || m.bracket_position == "7/8"}
|
||||
finalsMatches. each do |m|
|
||||
m.round = finalsRound
|
||||
m.save
|
||||
|
||||
Reference in New Issue
Block a user