Class: Spree::Api::InventoryUnitsController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- BaseController
- Spree::Api::InventoryUnitsController
- Defined in:
- app/controllers/spree/api/inventory_units_controller.rb
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
8 9 10 11 |
# File 'app/controllers/spree/api/inventory_units_controller.rb', line 8 def show @inventory_unit = inventory_unit respond_with(@inventory_unit) end |
#update ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/controllers/spree/api/inventory_units_controller.rb', line 13 def update :update, inventory_unit.order inventory_unit.transaction do if inventory_unit.update(inventory_unit_params) fire render :show, status: 200 else invalid_resource!(inventory_unit) end end end |