1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-14 00:49:54 +00:00

Added quick create high school girls weight classes

This commit is contained in:
2021-02-18 20:27:44 +00:00
parent 5677f4e944
commit 0aea26967a
5 changed files with 28 additions and 11 deletions

View File

@@ -31,15 +31,11 @@ class Tournament < ActiveRecord::Base
def tournament_types
["Pool to bracket","Modified 16 Man Double Elimination","Double Elimination 1-6"]
end
def create_pre_defined_weights(value)
def create_pre_defined_weights(weight_classes)
weights.destroy_all
if value == 'hs'
Weight::HS_WEIGHT_CLASSES.each do |w|
weights.create(max: w)
end
else
raise "Unspecified behavior"
weight_classes.each do |w|
weights.create(max: w)
end
end