From 177c5d136b77907262fe5ef56e479cc5bea90354 Mon Sep 17 00:00:00 2001 From: jcwimer Date: Wed, 30 Dec 2015 23:25:02 +0000 Subject: [PATCH] Ordered wrestlers correctly on school page --- app/views/schools/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/schools/show.html.erb b/app/views/schools/show.html.erb index d119208..4c40767 100644 --- a/app/views/schools/show.html.erb +++ b/app/views/schools/show.html.erb @@ -49,7 +49,7 @@ - <% @wrestlers.order("weight_id asc").each do |wrestler| %> + <% @wrestlers.sort_by{|w| w.weight.max}.each do |wrestler| %> <% if wrestler.school_id == @school.id %> <%= wrestler.name %>