Method: Effective::CartsController#destroy
- Defined in:
- app/controllers/effective/carts_controller.rb
#destroy ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/controllers/effective/carts_controller.rb', line 13 def destroy @cart = current_cart EffectiveOrders.(self, :destroy, @cart) if @cart.destroy flash[:success] = 'Successfully emptied cart.' else flash[:danger] = 'Unable to destroy cart.' end redirect_back_or_to_cart end |