From 4a2abcac0d781f4faeb859b0e1a32ec2c942296c Mon Sep 17 00:00:00 2001 From: Joe Rafaniello Date: Thu, 26 Sep 2024 14:50:11 -0400 Subject: [PATCH] Use rails 7 cache format as 7 can read either 6 or 7 See: https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#new-activesupport-cache-serialization-format Extracted from https://github.com/ManageIQ/manageiq/pull/23176 --- config/application.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/application.rb b/config/application.rb index 603f52b8192..c80e63dd107 100644 --- a/config/application.rb +++ b/config/application.rb @@ -121,6 +121,13 @@ class Application < Rails::Application # # https://bugs.ruby-lang.org/issues/14372 # + + # TODO: Remove this once we move to config.load_defaults 7.0 as this is the default. + # Note, rails 7 can read cache format from 6 or 7 so there is no risk if you're running rails 7. + # See: https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#new-activesupport-cache-serialization-format + warn "Warning: Remove redundant config.active_support.cache_format_version = 7.0 from #{__FILE__}:#{__LINE__ + 1} if using config.load_defaults 7.0" if config.active_support.cache_format_version = 7.0 + config.active_support.cache_format_version = 7.0 + config.autoload_paths << Rails.root.join("app/models/aliases").to_s config.autoload_paths << Rails.root.join("app/models/mixins").to_s config.autoload_paths << Rails.root.join("lib").to_s