1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-17 13:24:36 +00:00

Wrestler pool number is now saved in db. Pool number generation moved to it's own class.

This commit is contained in:
2017-03-02 18:11:21 +00:00
parent 8fa529dc5f
commit 3f72a912b6
12 changed files with 177 additions and 106 deletions

View File

@@ -1,6 +1,6 @@
<% @round = 1 %>
<% @pool = 1 %>
<% until @wrestlers.select{|w| w.generatePoolNumber == @pool}.blank? %>
<% until @wrestlers.select{|w| w.pool == @pool}.blank? %>
<h5>Pool <%= @pool %></h5>
<table class="table table-striped table-bordered table-condensed">
<thead>
@@ -15,7 +15,7 @@
</tr>
</thead>
<tbody>
<% @wrestlers.select{|w| w.generatePoolNumber == @pool}.sort_by{|w| w.seed}.each do |w| %>
<% @wrestlers.select{|w| w.pool == @pool}.sort_by{|w| w.seed}.each do |w| %>
<tr>
<td><%= w.original_seed %> <%= w.name %> <%= w.season_win %>-<%= w.season_loss %> <%= w.school.name %></td>
<% @round = 1 %>