1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-07 23:17:25 +00:00

Fixed double elim bracket views, fixed double elim match generation and loser name generation for 4 man bracket, fixed seed page submission and added tests, added tests for tournament generation errors and added a new error for assigning a seed higher than the number of wrestlers.

This commit is contained in:
2024-12-08 19:29:56 -05:00
parent f6ef471591
commit f18802a933
10 changed files with 278 additions and 37 deletions

View File

@@ -1,15 +1,9 @@
<% @final_match.each do |match| %>
<div class="round">
<% @final_match.each do |match| %>
<div class="game">
<div class="game-top "><%= match.w1_bracket_name.html_safe %> <span></span></div>
<div class="bout-number"><p><%= match.bout_number %> <%= match.bracket_score_string %></p><p><%= @winner_place %> Place Winner</p></div>
<div class="game-bottom "><%= match.w2_bracket_name.html_safe %><span></span></div>
</div>
</div>
<!-- <div class="round">
<div class="game">
<div class="bracket-winner"> <%= match.bracket_winner_name %></div>
<div class="bout_number"><%= @winner_place %> Place Winner</div>
</div>
<% end %>
</div> -->
<% end %>

View File

@@ -32,7 +32,6 @@
</div>
<h4>5/6 place match</h4>
<div class="bracket">
<!--Round 1-->
<% @final_match = @matches.select{|m|m.bracket_position == "5/6"} %>
<% @winner_place = "5th" %>
<%= render 'bracket_final' %>
@@ -40,7 +39,6 @@
<% if @tournament.number_of_placers >= 8 %>
<h4>7/8 place match</h4>
<div class="bracket">
<!--Round 1-->
<% @final_match = @matches.select{|m|m.bracket_position == "7/8"} %>
<% @winner_place = "7th" %>
<%= render 'bracket_final' %>