diff options
author | Xavier Noria <fxn@hashref.com> | 2010-08-11 23:54:15 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-08-12 00:17:10 +0200 |
commit | 1ee3593d65feacf88d2b9171dada85dbdeae65e5 (patch) | |
tree | 61299c9a4014feff0c510fa1f00bb3b5c84274cc | |
parent | 06dc88445463513b58ed47ae8b21f853efda6898 (diff) | |
download | rails-1ee3593d65feacf88d2b9171dada85dbdeae65e5.tar.gz rails-1ee3593d65feacf88d2b9171dada85dbdeae65e5.tar.bz2 rails-1ee3593d65feacf88d2b9171dada85dbdeae65e5.zip |
no need to assign if we are gonna return
-rw-r--r-- | actionpack/lib/action_dispatch/http/cache.rb | 4 |
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] |