mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-04 13:43:48 +00:00
New bracket positions for double elim brackets. Each bracket position will now wrestle during the same round. Made a rake task to migrate previous matches to the new bracket positions.
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
<h4>Championship Bracket</h4>
|
||||
<div class="bracket">
|
||||
<% if @weight.highest_bracket_round %>
|
||||
<% (1..@weight.highest_bracket_round).each do |round| %>
|
||||
<% @round_matches = @matches.select{|m|m.bracket_position == "Bracket" and m.round == round} %>
|
||||
<% (@weight.lowest_bracket_round..@weight.highest_bracket_round).each do |round| %>
|
||||
<% @round_matches = @matches.select{|m|m.bracket_position.include? "Bracket" and m.round == round} %>
|
||||
<%= render 'bracket_round' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -30,15 +30,11 @@
|
||||
<h4>Consolation Bracket</h4>
|
||||
<div class="bracket">
|
||||
<% if @weight.highest_conso_round %>
|
||||
<% (1..@weight.highest_conso_round).each do |round| %>
|
||||
<% @round_matches = @matches.select{|m|m.bracket_position == "Conso" and m.round == round} %>
|
||||
<% (@weight.lowest_conso_round..@weight.highest_conso_round).each do |round| %>
|
||||
<% @round_matches = @matches.select{|m|m.bracket_position.include? "Conso" and m.round == round} %>
|
||||
<%= render 'bracket_round' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% @round_matches = @matches.select{|m|m.bracket_position == "Conso Quarter"} %>
|
||||
<%= render 'bracket_round' %>
|
||||
<% @round_matches = @matches.select{|m|m.bracket_position == "Conso Semis"} %>
|
||||
<%= render 'bracket_round' %>
|
||||
<% @final_match = @matches.select{|m|m.bracket_position == "3/4"} %>
|
||||
<% @winner_place = "3rd" %>
|
||||
<%= render 'bracket_final' %>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<h4>Championship Bracket</h4>
|
||||
<div class="bracket">
|
||||
<!--Round 1-->
|
||||
<% @round_matches = @matches.select{|m|m.bracket_position == "Bracket" and m.round == 1} %>
|
||||
<% @round_matches = @matches.select{|m|m.bracket_position == "Bracket Round of 16"} %>
|
||||
<%= render 'bracket_round' %>
|
||||
<!--Round 2-->
|
||||
<% @round_matches = @matches.select{|m|m.bracket_position == "Quarter"} %>
|
||||
@@ -24,7 +24,7 @@
|
||||
<h4>Consolation Bracket</h4>
|
||||
<div class="bracket">
|
||||
<!--Round 1-->
|
||||
<% @round_matches = @matches.select{|m|m.bracket_position == "Conso" and m.round == 2} %>
|
||||
<% @round_matches = @matches.select{|m|m.bracket_position == "Conso Round of 8"} %>
|
||||
<%= render 'bracket_round' %>
|
||||
<!--Round 2-->
|
||||
<% @round_matches = @matches.select{|m|m.bracket_position == "Conso Quarter"} %>
|
||||
|
||||
Reference in New Issue
Block a user