mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-05 06:07:20 +00:00
Recommend deleting delegations instead of deleting them
This commit is contained in:
@@ -3,7 +3,6 @@ module GeneratesTournamentMatches
|
||||
def generateMatchups
|
||||
self.curently_generating_matches = 1
|
||||
self.save
|
||||
removeSchoolDelegations
|
||||
resetSchoolScores
|
||||
setSeedsAndRandomSeedingWrestlersWithoutSeeds
|
||||
poolToBracket() if tournament_type == "Pool to bracket"
|
||||
@@ -52,12 +51,6 @@ module GeneratesTournamentMatches
|
||||
end
|
||||
end
|
||||
|
||||
def removeSchoolDelegations
|
||||
self.schools.each do |s|
|
||||
s.delegates.each do |d|
|
||||
d.destroy
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
@@ -101,4 +101,12 @@ class Tournament < ActiveRecord::Base
|
||||
end
|
||||
point_adjustments
|
||||
end
|
||||
|
||||
def removeSchoolDelegations
|
||||
self.schools.each do |s|
|
||||
s.delegates.each do |d|
|
||||
d.destroy
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user