Class: Cartify::CartsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Cartify::CartsController
- Defined in:
- app/controllers/cartify/carts_controller.rb
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
5 6 7 |
# File 'app/controllers/cartify/carts_controller.rb', line 5 def show @order_items = current_order.order_items end |
#update ⇒ Object
9 10 11 12 |
# File 'app/controllers/cartify/carts_controller.rb', line 9 def update current_order.update_attributes(coupon_id: coupon.id) if coupon redirect_to cart_path, notice: coupon ? t('flash.coupon_applied') : t('flash.fake_coupon') end |