1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-11 16:01:56 +00:00

Merge branch 'development'

This commit is contained in:
2018-01-31 08:50:02 -05:00

View File

@@ -8,6 +8,7 @@ class GenerateTournamentMatches
@tournament.curently_generating_matches = 1 @tournament.curently_generating_matches = 1
@tournament.save @tournament.save
unAssignBouts unAssignBouts
unAssignMats
PoolToBracketMatchGeneration.new(@tournament).generatePoolToBracketMatchesWeight(weight) if @tournament.tournament_type == "Pool to bracket" PoolToBracketMatchGeneration.new(@tournament).generatePoolToBracketMatchesWeight(weight) if @tournament.tournament_type == "Pool to bracket"
postMatchCreationActions postMatchCreationActions
PoolToBracketGenerateLoserNames.new(@tournament).assignLoserNamesWeight(weight) if @tournament.tournament_type == "Pool to bracket" PoolToBracketGenerateLoserNames.new(@tournament).assignLoserNamesWeight(weight) if @tournament.tournament_type == "Pool to bracket"
@@ -71,6 +72,13 @@ class GenerateTournamentMatches
end end
end end
def unAssignMats
matches = @tournament.matches.reload
matches.each do |m|
m.mat_id = nil
end
end
def unAssignBouts def unAssignBouts
bout_counts = Hash.new(0) bout_counts = Hash.new(0)
@tournament.matches.each do |m| @tournament.matches.each do |m|