aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/http/cache.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-08-11 23:54:15 +0200
committerXavier Noria <fxn@hashref.com>2010-08-12 00:17:10 +0200
commit1ee3593d65feacf88d2b9171dada85dbdeae65e5 (patch)
tree61299c9a4014feff0c510fa1f00bb3b5c84274cc /actionpack/lib/action_dispatch/http/cache.rb
parent06dc88445463513b58ed47ae8b21f853efda6898 (diff)
downloadrails-1ee3593d65feacf88d2b9171dada85dbdeae65e5.tar.gz
rails-1ee3593d65feacf88d2b9171dada85dbdeae65e5.tar.bz2
rails-1ee3593d65feacf88d2b9171dada85dbdeae65e5.zip
no need to assign if we are gonna return
Diffstat (limited to 'actionpack/lib/action_dispatch/http/cache.rb')
-rw-r--r--actionpack/lib/action_dispatch/http/cache.rb4
1 files changed, 2 insertions, 2 deletions
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]