From b25332b2626d9a62eb4fb03f0e7c8f4e5c3dbda7 Mon Sep 17 00:00:00 2001 From: Didier Lafforgue Date: Mon, 16 Apr 2012 11:49:04 +0200 Subject: [PATCH] disable the inline editor launch button if the page to display enabled the cache (quick patch for #353) --- lib/locomotive/render.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/locomotive/render.rb b/lib/locomotive/render.rb index c6ad7d9f..3e23d3bc 100644 --- a/lib/locomotive/render.rb +++ b/lib/locomotive/render.rb @@ -88,7 +88,8 @@ module Locomotive fresh_when :etag => @page, :last_modified => @page.updated_at.utc, :public => true if @page.cache_strategy != 'simple' # varnish - response.cache_control[:max_age] = @page.cache_strategy + response.headers['Editable'] = '' + response.cache_control[:max_age] = @page.cache_strategy end end