1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

no need to assign if we are gonna return

This commit is contained in:
Xavier Noria 2010-08-11 23:54:15 +02:00
parent 06dc884454
commit 1ee3593d65

View file

@ -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]