Class: ShoppingCart::OrderItemsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- ShoppingCart::OrderItemsController
- Includes:
- CurrentSession
- Defined in:
- app/controllers/shopping_cart/order_items_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
7 8 9 10 11 |
# File 'app/controllers/shopping_cart/order_items_controller.rb', line 7 def create CreateOrderItem.call(params: permited_params, order: current_order) do on(:ok) { render :create } end end |
#destroy ⇒ Object
17 18 19 |
# File 'app/controllers/shopping_cart/order_items_controller.rb', line 17 def destroy @order_item.destroy end |
#update ⇒ Object
13 14 15 |
# File 'app/controllers/shopping_cart/order_items_controller.rb', line 13 def update @order_item.update(quantity: params[:quantity]) end |