Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Fixed: properly set `yaml_column_permitted_classes` (#12386)

Damian Legawiec76c05e994693
diff --git a/core/lib/spree/core/engine.rb b/core/lib/spree/core/engine.rb
index 54b58f71a8..55bc83ed98 100644
--- a/core/lib/spree/core/engine.rb
+++ b/core/lib/spree/core/engine.rb
@@ -33,7 +33,7 @@ module Spree
initializer 'spree.environment', before: :load_config_initializers do |app|
app.config.spree = Environment.new(SpreeCalculators.new, Spree::Core::Configuration.new, Spree::Core::Dependencies.new)
app.config.active_record.yaml_column_permitted_classes ||= []
- app.config.active_record.yaml_column_permitted_classes << [Symbol, BigDecimal, ActiveSupport::HashWithIndifferentAccess]
+ app.config.active_record.yaml_column_permitted_classes.concat([Symbol, BigDecimal, ActiveSupport::HashWithIndifferentAccess])
Spree::Config = app.config.spree.preferences
Spree::RuntimeConfig = app.config.spree.preferences # for compatibility
Spree::Dependencies = app.config.spree.dependencies