mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-17 05:15:36 +00:00
Fixed school show caching
This commit is contained in:
@@ -28,9 +28,11 @@ class Mat < ActiveRecord::Base
|
|||||||
if match.save
|
if match.save
|
||||||
if match.w1
|
if match.w1
|
||||||
match.wrestler1.touch
|
match.wrestler1.touch
|
||||||
|
match.wrestler1.school.touch
|
||||||
end
|
end
|
||||||
if match.w2
|
if match.w2
|
||||||
match.wrestler2.touch
|
match.wrestler2.touch
|
||||||
|
match.wrestler2.school.touch
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
<% cache ["#{@school.id}_school_show", @school] do %>
|
|
||||||
<p>
|
<p>
|
||||||
<strong>Name:</strong>
|
<strong>Name:</strong>
|
||||||
<%= @school.name %>
|
<%= @school.name %>
|
||||||
@@ -38,6 +37,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<% cache ["#{@school.id}_school_show", @school] do %>
|
||||||
<% @wrestlers.sort_by{|w| w.weight.max}.each do |wrestler| %>
|
<% @wrestlers.sort_by{|w| w.weight.max}.each do |wrestler| %>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= link_to "#{wrestler.name}", wrestler %></td>
|
<td><%= link_to "#{wrestler.name}", wrestler %></td>
|
||||||
|
|||||||
Reference in New Issue
Block a user