1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-05-19 11:33:49 +00:00

Recommend deleting delegations instead of deleting them

This commit is contained in:
2016-01-13 13:50:19 +00:00
parent 85996d1955
commit c537c6067c
3 changed files with 10 additions and 9 deletions

View File

@@ -3,7 +3,6 @@ module GeneratesTournamentMatches
def generateMatchups def generateMatchups
self.curently_generating_matches = 1 self.curently_generating_matches = 1
self.save self.save
removeSchoolDelegations
resetSchoolScores resetSchoolScores
setSeedsAndRandomSeedingWrestlersWithoutSeeds setSeedsAndRandomSeedingWrestlersWithoutSeeds
poolToBracket() if tournament_type == "Pool to bracket" poolToBracket() if tournament_type == "Pool to bracket"
@@ -52,12 +51,6 @@ module GeneratesTournamentMatches
end end
end end
def removeSchoolDelegations
self.schools.each do |s|
s.delegates.each do |d|
d.destroy
end
end
end
end end

View File

@@ -101,4 +101,12 @@ class Tournament < ActiveRecord::Base
end end
point_adjustments point_adjustments
end end
def removeSchoolDelegations
self.schools.each do |s|
s.delegates.each do |d|
d.destroy
end
end
end
end end

View File

@@ -1,3 +1,3 @@
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}", :class=>"btn btn-default" %> <%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}", :class=>"btn btn-default" %>
<br><br> <br><br>
Matches are being generated. This can take anywhere from 1-5 minutes to finish. All permission delegations for schools have been deleted to prevent lineup changes after the tournament has started. Matches are being generated. This can take anywhere from 1-5 minutes to finish. It is recommended to delete all delegated school permissions to prevent lineup changes after the tournament has started.