Class: Spree::OrderPromotionSubscriber
- Inherits:
-
Object
- Object
- Spree::OrderPromotionSubscriber
- Includes:
- Omnes::Subscriber
- Defined in:
- app/subscribers/spree/order_promotion_subscriber.rb
Overview
Clears promotions from an emptied order
Instance Method Summary collapse
-
#clear_order_promotions(event) ⇒ Object
Clears all promotions from the order.
Instance Method Details
#clear_order_promotions(event) ⇒ Object
Clears all promotions from the order
15 16 17 18 |
# File 'app/subscribers/spree/order_promotion_subscriber.rb', line 15 def clear_order_promotions(event) order = event[:order] order.order_promotions.destroy_all end |