mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-30 19:22:21 +00:00
Added back links to brackets and weights static_pages
This commit is contained in:
@@ -7,6 +7,7 @@ class StaticPagesController < ApplicationController
|
||||
def brackets
|
||||
if params[:weight]
|
||||
@weight = Weight.find(params[:weight])
|
||||
@tournament = Tournament.find(@weight.tournament_id)
|
||||
@wrestlers = Wrestler.where(weight_id: @weight.id)
|
||||
@bracket_size = Wrestler.where(weight_id: @weight.id).count
|
||||
@seed1 = Wrestler.where(weight_id: @weight.id, original_seed: 1).first
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
<%= link_to "Back to #{@tournament.name} weights", "/static_pages/weights?tournament=#{@tournament.id}" %>
|
||||
<br>
|
||||
<br>
|
||||
<% if @bracket_size == 10 %>
|
||||
<%= render 'man10' %>
|
||||
<% elsif @bracket_size == 9 %>
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}" %>
|
||||
<br>
|
||||
<br>
|
||||
<% @weights.each do |weight| %>
|
||||
<%= link_to "#{weight.max}" , "/static_pages/brackets?weight=#{weight.id}" %>
|
||||
<br>
|
||||
|
||||
Reference in New Issue
Block a user