1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-09 15:42:09 +00:00

Random seeding now works

This commit is contained in:
2015-12-30 16:21:56 +00:00
parent 6ed2bdf547
commit 74577eb9ec
11 changed files with 131 additions and 21 deletions

View File

@@ -25,7 +25,7 @@
</thead>
<tbody>
<%= form_tag @wrestlers_update_path do %>
<% @wrestlers.order("original_seed asc").each do |wrestler| %>
<% @wrestlers.sort_by{|w| [w.original_seed ? 0 : 1, w.original_seed || 0]}.each do |wrestler| %>
<% if wrestler.weight_id == @weight.id %>
<tr>
<td><%= wrestler.name %></td>
@@ -53,7 +53,9 @@
<% end %>
</tbody>
</table>
<br><p>*All wrestlers without a seed (determined by tournament director) will be assigned a random seed.</p>
<% if tournament_permissions(@tournament) %>
<br>
<%= submit_tag "Save", :class=>"btn btn-success"%>
<% end %>
<% end %>