1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-24 17:04:43 +00:00
Files
wrestlingdev.com/app/services/tournament_services/wipe_tournament_matches.rb

24 lines
435 B
Ruby

class WipeTournamentMatches
def initialize( tournament )
@tournament = tournament
end
def setUpMatchGeneration
wipeMatches
resetSchoolScores
end
def wipeWeightMatches(weight)
weight.matches.destroy_all
end
def wipeMatches
@tournament.destroy_all_matches
end
def resetSchoolScores
@tournament.schools.update_all("score = 0.0")
end
end