1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-05-09 07:11:59 +00:00

Ordered wrestlers correctly on school page

This commit is contained in:
2015-12-30 23:25:02 +00:00
parent e460fd7880
commit 177c5d136b

View File

@@ -49,7 +49,7 @@
</thead> </thead>
<tbody> <tbody>
<% @wrestlers.order("weight_id asc").each do |wrestler| %> <% @wrestlers.sort_by{|w| w.weight.max}.each do |wrestler| %>
<% if wrestler.school_id == @school.id %> <% if wrestler.school_id == @school.id %>
<tr> <tr>
<td><%= wrestler.name %></td> <td><%= wrestler.name %></td>