Sha256: 39170f76da0b3dc7963debb75bd50cfa8f7df3f40189d5db754c09063fbbe3e8

Contents?: true

Size: 347 Bytes

Versions: 3

Compression:

Stored size: 347 Bytes

Contents

module SpreeMultiVendor::Spree::Api::V1::ProductsControllerDecorator
  def self.prepended(base)
    base.before_action only: [:create, :update] do
      set_vendor_id(:product)
    end
  end
end

Spree::Api::V1::ProductsController.prepend SpreeMultiVendor::Spree::Api::V1::ProductsControllerDecorator if SpreeMultiVendor::Engine.api_v1_available?

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
spree_multi_vendor-2.5.0 app/controllers/spree_multi_vendor/spree/api/v1/products_controller_decorator.rb
spree_multi_vendor-2.4.1 app/controllers/spree_multi_vendor/spree/api/v1/products_controller_decorator.rb
spree_multi_vendor-2.4.0 app/controllers/spree_multi_vendor/spree/api/v1/products_controller_decorator.rb