1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-24 17:04:43 +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.save
unAssignBouts
unAssignMats
PoolToBracketMatchGeneration.new(@tournament).generatePoolToBracketMatchesWeight(weight) if @tournament.tournament_type == "Pool to bracket"
postMatchCreationActions
PoolToBracketGenerateLoserNames.new(@tournament).assignLoserNamesWeight(weight) if @tournament.tournament_type == "Pool to bracket"
@@ -71,6 +72,13 @@ class GenerateTournamentMatches
end
end
def unAssignMats
matches = @tournament.matches.reload
matches.each do |m|
m.mat_id = nil
end
end
def unAssignBouts
bout_counts = Hash.new(0)
@tournament.matches.each do |m|