From 6f7d3ab50b0449f995cad10dc65ec34b97b1616b Mon Sep 17 00:00:00 2001 From: Adrien Dessy Date: Thu, 19 Dec 2024 13:51:28 +0100 Subject: [PATCH] [TAN-3184] Update to Rails 7 cache format --- back/config/application.rb | 1 + .../initializers/new_framework_defaults_7_0.rb | 14 -------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/back/config/application.rb b/back/config/application.rb index a79ebe90a66d..399143dd1504 100644 --- a/back/config/application.rb +++ b/back/config/application.rb @@ -34,6 +34,7 @@ class Application < Rails::Application # TODO: Delete the following settings once we move to config.load_defaults 7.0 config.active_support.disable_to_s_conversion = true + config.active_support.cache_format_version = 7.0 # Configuration for the application, engines, and railties goes here. # diff --git a/back/config/initializers/new_framework_defaults_7_0.rb b/back/config/initializers/new_framework_defaults_7_0.rb index 4281ed58b5aa..13a1e5377979 100644 --- a/back/config/initializers/new_framework_defaults_7_0.rb +++ b/back/config/initializers/new_framework_defaults_7_0.rb @@ -86,15 +86,6 @@ 'Referrer-Policy' => 'strict-origin-when-cross-origin' } -# ** Please read carefully, this must be configured in config/application.rb ** -# Change the format of the cache entry. -# Changing this default means that all new cache entries added to the cache -# will have a different format that is not supported by Rails 6.1 applications. -# Only change this value after your application is fully deployed to Rails 7.0 -# and you have no plans to rollback. -# When you're ready to change format, add this to `config/application.rb` (NOT this file): -# config.active_support.cache_format_version = 7.0 - # Cookie serializer: 2 options # # If you're upgrading and haven't set `cookies_serializer` previously, your cookie serializer @@ -123,8 +114,3 @@ # Change the return value of `ActionDispatch::Request#content_type` to the Content-Type header without modification. Rails.application.config.action_dispatch.return_only_request_media_type_on_content_type = false - -# ** Please read carefully, this must be configured in config/application.rb (NOT this file) ** -# Disables the deprecated #to_s override in some Ruby core classes -# See https://guides.rubyonrails.org/configuring.html#config-active-support-disable-to-s-conversion for more information. -# config.active_support.disable_to_s_conversion = true