Module: ShopDiscounts::Models::FormLineItem
- Defined in:
- lib/shop_discounts/models/form_line_item.rb
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/shop_discounts/models/form_line_item.rb', line 5 def self.included(base) base.class_eval do def create_with_discounts @result = create_without_discounts @order.discountables.each do |discountable| discountable.create_shop_line_items end @result end alias_method_chain :create, :discounts end end |