From 308090f3309b95b083c4eb2a4e4ee8b335ce5523 Mon Sep 17 00:00:00 2001 From: jcwimer Date: Thu, 24 Dec 2015 21:38:33 +0000 Subject: [PATCH] Do not cache edit button on school and wrestler show pages --- app/views/schools/show.html.erb | 3 ++- app/views/wrestlers/show.html.erb | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/schools/show.html.erb b/app/views/schools/show.html.erb index ccb09a8..e73a55d 100644 --- a/app/views/schools/show.html.erb +++ b/app/views/schools/show.html.erb @@ -1,9 +1,10 @@ -<% cache ["schools", @school] do %> +

<%= notice %>

<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}",:class=>"btn btn-default" %> <% if tournament_permissions(@school.tournament) %> | <%= link_to "Edit #{@school.name}", edit_school_path(@school),:class=>"btn btn-primary" %> <% end %> +<% cache ["schools", @school] do %>

diff --git a/app/views/wrestlers/show.html.erb b/app/views/wrestlers/show.html.erb index 9f5f3e8..aaf5bc1 100644 --- a/app/views/wrestlers/show.html.erb +++ b/app/views/wrestlers/show.html.erb @@ -1,10 +1,11 @@ -<% cache ["wrestlers", @wrestler] do %> +

<%= notice %>

<%= link_to "Back to #{@school.name}", "/schools/#{@school.id}", :class=>"btn btn-default" %> <% if tournament_permissions(@wrestler.tournament) %> | <%= link_to "Edit #{@wrestler.name}", edit_wrestler_path(@wrestler), :class=>"btn btn-primary" %> <% end %> +<% cache ["wrestlers", @wrestler] do %>