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:
@@ -6,6 +6,7 @@ module GeneratesTournamentMatches
|
||||
end
|
||||
|
||||
def poolToBracket
|
||||
resetSchoolScores
|
||||
destroyAllMatches
|
||||
buildTournamentWeights
|
||||
generateMatches
|
||||
|
||||
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user