1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-30 19:22:21 +00:00

Reset team scores when generating matches

This commit is contained in:
2015-12-23 15:38:33 +00:00
parent 49bcbfcc84
commit 5ee949d02a
2 changed files with 4 additions and 1 deletions

View File

@@ -6,6 +6,7 @@ module GeneratesTournamentMatches
end
def poolToBracket
resetSchoolScores
destroyAllMatches
buildTournamentWeights
generateMatches

View File

@@ -9,7 +9,9 @@ class Tournament < ActiveRecord::Base
has_many :wrestlers, through: :weights
has_many :matches, dependent: :destroy
def resetSchoolScores
schools.update_all("score = 0.0")
end
def tournament_types
["Pool to bracket"]