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.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Deprecate ProductProperty#property_name=
Damian Legawiec4f63bf0cd1ba
diff --git a/core/app/models/spree/product_property.rb b/core/app/models/spree/product_property.rbindex cb21b6c27d..a4829c4e3b 100644--- a/core/app/models/spree/product_property.rb+++ b/core/app/models/spree/product_property.rb@@ -22,6 +22,9 @@ module Spreedelegate :name, :presentation, to: :property, prefix: true, allow_nil: truedef property_name=(name)+ ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)+ `ProductProperty#property_name=` is deprecated and will be removed in Spree 5.0.+ DEPRECATIONif name.present?# don't use `find_by :name` to workaround globalize/globalize#423 bugself.property = Property.where(name: name).first_or_create(presentation: name)