From 1ee3593d65feacf88d2b9171dada85dbdeae65e5 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Wed, 11 Aug 2010 23:54:15 +0200 Subject: no need to assign if we are gonna return --- actionpack/lib/action_dispatch/http/cache.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack') diff --git a/actionpack/lib/action_dispatch/http/cache.rb b/actionpack/lib/action_dispatch/http/cache.rb index e9fdf75cc8..047fab006e 100644 --- a/actionpack/lib/action_dispatch/http/cache.rb +++ b/actionpack/lib/action_dispatch/http/cache.rb @@ -113,10 +113,10 @@ module ActionDispatch DEFAULT_CACHE_CONTROL = "max-age=0, private, must-revalidate" def set_conditional_cache_control! - control = @cache_control - return if self["Cache-Control"].present? + control = @cache_control + if control.empty? headers["Cache-Control"] = DEFAULT_CACHE_CONTROL elsif @cache_control[:no_cache] -- cgit v1.2.3