Fix rubocop issue

This commit is contained in:
Luis Ramos
2020-06-22 16:19:37 +01:00
parent 8870dc4b06
commit 730959f85f
2 changed files with 2 additions and 6 deletions

View File

@@ -498,11 +498,6 @@ Style/ClassVars:
Exclude:
- 'lib/open_food_network/rack_request_blocker.rb'
# Offense count: 1
Style/CommentedKeyword:
Exclude:
- 'app/controllers/application_controller.rb'
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.

View File

@@ -134,7 +134,8 @@ class ApplicationController < ActionController::Base
nil
end
def set_cache_headers # https://jacopretorius.net/2014/01/force-page-to-reload-on-browser-back-in-rails.html
# See https://jacopretorius.net/2014/01/force-page-to-reload-on-browser-back-in-rails.html
def set_cache_headers
response.headers["Cache-Control"] = "no-cache, no-store, max-age=0, must-revalidate"
response.headers["Pragma"] = "no-cache"
response.headers["Expires"] = "Fri, 01 Jan 1990 00:00:00 GMT"