From c83ce40e0b2c319370bb352738e6fcd6dba0bd73 Mon Sep 17 00:00:00 2001 From: Finn Bacall Date: Mon, 18 Jul 2022 09:38:35 +0100 Subject: [PATCH] Permitted various Rails-related classes for YAML deserialization --- config/application.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/application.rb b/config/application.rb index 0162f83c6..edf816396 100644 --- a/config/application.rb +++ b/config/application.rb @@ -31,6 +31,11 @@ class Application < Rails::Application config.i18n.load_path += Dir[Rails.root.join('config', 'locales', 'overrides', '**', '*.{rb,yml}')] unless Rails.env.test? config.i18n.available_locales = [:en] config.i18n.default_locale = :en + + config.active_record.yaml_column_permitted_classes = [ + Symbol, Date, Time, ActiveSupport::TimeWithZone, ActiveSupport::TimeZone, + ActiveSupport::HashWithIndifferentAccess, BigDecimal + ] end Config = OpenStruct.new(Rails.configuration.tess.with_indifferent_access)