Module: SpreeMultiStore::Api::ShipmentsControllerDecorator

Defined in:
app/controllers/spree/api/shipments_controller_decorator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



4
5
6
# File 'app/controllers/spree/api/shipments_controller_decorator.rb', line 4

def self.included(base)
  base.alias_method_chain :mine, :store_scope
end

Instance Method Details

#mine_with_store_scopeObject



8
9
10
11
# File 'app/controllers/spree/api/shipments_controller_decorator.rb', line 8

def mine_with_store_scope
  mine_without_store_scope
  @shipments = @shipments.where(spree_orders: { store_id: current_store.id }) if @shipments
end