mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-20 22:18:18 +00:00
Needed to reload a tournament to move finals matches to the last round
This commit is contained in:
@@ -53,7 +53,7 @@ class GenerateTournamentMatches
|
|||||||
end
|
end
|
||||||
|
|
||||||
def moveFinalsMatchesToLastRound
|
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 = @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|
|
finalsMatches. each do |m|
|
||||||
m.round = finalsRound
|
m.round = finalsRound
|
||||||
|
|||||||
Reference in New Issue
Block a user