diff --git a/app/models/mat.rb b/app/models/mat.rb index c6f139f..4404641 100644 --- a/app/models/mat.rb +++ b/app/models/mat.rb @@ -28,9 +28,11 @@ class Mat < ActiveRecord::Base if match.save if match.w1 match.wrestler1.touch + match.wrestler1.school.touch end if match.w2 match.wrestler2.touch + match.wrestler2.school.touch end return true else diff --git a/app/views/schools/show.html.erb b/app/views/schools/show.html.erb index fb8e682..a4362f2 100644 --- a/app/views/schools/show.html.erb +++ b/app/views/schools/show.html.erb @@ -1,4 +1,3 @@ -<% cache ["#{@school.id}_school_show", @school] do %>
Name: <%= @school.name %> @@ -38,6 +37,7 @@
+<% cache ["#{@school.id}_school_show", @school] do %> <% @wrestlers.sort_by{|w| w.weight.max}.each do |wrestler| %>