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

Needed to reload a tournament to move finals matches to the last round

This commit is contained in:
2019-01-30 13:33:11 +00:00
parent c0d5e3ff82
commit f43cd316f6

View File

@@ -53,7 +53,7 @@ class GenerateTournamentMatches
end
def moveFinalsMatchesToLastRound
finalsRound = @tournament.total_rounds
finalsRound = @tournament.reload.total_rounds
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