Skip to content

Commit

Permalink
Rails 7.1: Set the default column serialization coder.
Browse files Browse the repository at this point in the history
  • Loading branch information
adeherdt-r7 committed Nov 12, 2024
1 parent 93edc51 commit 89822f0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 89822f0

Please sign in to comment.