1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Fixed school show caching

This commit is contained in:
2023-01-19 01:47:32 +00:00
parent bde2b6d8c4
commit c3480909a2
2 changed files with 3 additions and 1 deletions

View File

@@ -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

View File

@@ -1,4 +1,3 @@
<% cache ["#{@school.id}_school_show", @school] do %>
<p>
<strong>Name:</strong>
<%= @school.name %>
@@ -38,6 +37,7 @@
</thead>
<tbody>
<% cache ["#{@school.id}_school_show", @school] do %>
<% @wrestlers.sort_by{|w| w.weight.max}.each do |wrestler| %>
<tr>
<td><%= link_to "#{wrestler.name}", wrestler %></td>