1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-06 22:44:14 +00:00

Created Pool 1 of 10 Man Bracket

This commit is contained in:
Jacob Cody Wimer
2014-01-24 08:41:49 -05:00
parent e36b4ec5ab
commit dddedcf30f
11 changed files with 104 additions and 13 deletions

View File

@@ -4,8 +4,24 @@ class StaticPagesController < ApplicationController
@tournaments = Tournament.all
end
def school
@school = School.all
def brackets
if params[:weight]
@weight = Weight.find(params[:weight])
@wrestlers = Wrestler.where(weight_id: @weight.id)
@seed1 = Wrestler.where(weight_id: @weight.id, original_seed: 1).first
end
#@seed1 = @wrestlers.where(original_seed: 1).name
end
def weights
if params[:tournament]
@tournament = Tournament.find(params[:tournament])
end
if @tournament
@weights = Weight.where(tournament_id: @tournament.id)
end
end
end