From d76f79f64706f6e9f48d9a9cef2f049f1aed09e5 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Sat, 29 Jul 2023 22:28:05 +0200 Subject: [PATCH] Remove obsolete backport from Rails 7 (#26254) --- config/application.rb | 1 - .../conditional_get_extensions.rb | 15 --------------- 2 files changed, 16 deletions(-) delete mode 100644 lib/action_controller/conditional_get_extensions.rb diff --git a/config/application.rb b/config/application.rb index 436d7b330..a3bd3dfa4 100644 --- a/config/application.rb +++ b/config/application.rb @@ -46,7 +46,6 @@ require_relative '../lib/chewy/strategy/bypass_with_warning' require_relative '../lib/webpacker/manifest_extensions' require_relative '../lib/webpacker/helper_extensions' require_relative '../lib/rails/engine_extensions' -require_relative '../lib/action_controller/conditional_get_extensions' require_relative '../lib/active_record/database_tasks_extensions' require_relative '../lib/active_record/batches' require_relative '../lib/simple_navigation/item_extensions' diff --git a/lib/action_controller/conditional_get_extensions.rb b/lib/action_controller/conditional_get_extensions.rb deleted file mode 100644 index 192ed341e..000000000 --- a/lib/action_controller/conditional_get_extensions.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -module ActionController - module ConditionalGetExtensions - def expires_in(*) - # This backports a fix from Rails 7 so that a more private Cache-Control - # can be overriden by calling expires_in on a specific controller action - response.cache_control.delete(:no_store) - - super - end - end -end - -ActionController::ConditionalGet.prepend(ActionController::ConditionalGetExtensions)