From 89822f07a6743506dc86456a23a06304e512834d Mon Sep 17 00:00:00 2001 From: Arne De Herdt Date: Tue, 12 Nov 2024 12:38:36 +0100 Subject: [PATCH] Rails 7.1: Set the default column serialization coder. --- config/application.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/application.rb b/config/application.rb index 002c4207768d6..f675908729416 100644 --- a/config/application.rb +++ b/config/application.rb @@ -40,14 +40,22 @@ class Application < Rails::Application config.paths['log'] = "#{Msf::Config.log_directory}/#{Rails.env}.log" config.paths['config/database'] = [Metasploit::Framework::Database.configurations_pathname.try(:to_path)] config.autoloader = :zeitwerk + + # Load the Rails 7.1 defaults. config.load_defaults 7.1 + + # The cache behavior changed with Rails 7.1, and requires the desired version to be set. config.active_support.cache_format_version = 7.1 + # The default column serializer was YAML prior to Rails 7.1 + config.active_record.default_column_serializer = ::YAML + case Rails.env when "development" config.eager_load = false when "test" config.eager_load = false + # Disable file reloading in test config.enable_reloading = false when "production" config.eager_load = false