From 1e856e0360234a52b1492d96e64e6bb3e26d937b Mon Sep 17 00:00:00 2001 From: sreyleak Date: Mon, 9 Dec 2024 09:54:20 +0700 Subject: [PATCH] Close #2124 Add a state attribute field to the vendor --- .../spree/v2/storefront/vendor_serializer_decorator.rb | 2 +- spec/serializers/spree/v2/storefront/vendor_serializer_spec.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/serializers/spree/v2/storefront/vendor_serializer_decorator.rb b/app/serializers/spree/v2/storefront/vendor_serializer_decorator.rb index 0540b4b53..9fc5fc764 100644 --- a/app/serializers/spree/v2/storefront/vendor_serializer_decorator.rb +++ b/app/serializers/spree/v2/storefront/vendor_serializer_decorator.rb @@ -3,7 +3,7 @@ module V2 module Storefront module VendorSerializerDecorator def self.prepended(base) - base.attributes :min_price, :max_price, :star_rating, :short_description, :full_address + base.attributes :min_price, :max_price, :star_rating, :short_description, :full_address, :state base.has_many :stock_locations base.has_many :variants, serializer: 'Spree::Variant' diff --git a/spec/serializers/spree/v2/storefront/vendor_serializer_spec.rb b/spec/serializers/spree/v2/storefront/vendor_serializer_spec.rb index 94c55882f..f891c56a6 100644 --- a/spec/serializers/spree/v2/storefront/vendor_serializer_spec.rb +++ b/spec/serializers/spree/v2/storefront/vendor_serializer_spec.rb @@ -27,7 +27,8 @@ :max_price, :star_rating, :short_description, - :full_address + :full_address, + :state ) end