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

Fixed caching for wrestler and school show pages

This commit is contained in:
2016-01-13 16:05:40 +00:00
parent f2e28505a6
commit 91ba292306
2 changed files with 5 additions and 2 deletions

View File

@@ -36,6 +36,7 @@
<% end %>
<br>
<br>
<table class="table table-striped table-bordered table-condensed">
<thead>
<tr>
@@ -51,7 +52,7 @@
<tbody>
<% @wrestlers.sort_by{|w| w.weight.max}.each do |wrestler| %>
<% if wrestler.school_id == @school.id %>
<% cache ["schools_view_wrestler", wrestler] do %>
<tr>
<td><%= wrestler.name %></td>
<td><%= wrestler.weight.max %></td>
@@ -63,6 +64,7 @@
Yes
<% end %></td>
<td><%= wrestler.nextMatchBoutNumber %> <%= wrestler.nextMatchMatName %></td>
<% end %>
<td>
<%= link_to 'Show', wrestler , :class=>"btn btn-default btn-sm" %>
<% if can? :manage, wrestler.school %>
@@ -71,7 +73,6 @@
<% end %>
</td>
</tr>
<% end %>
<% end %>
</tbody>
</table>