Class: Corzinus::DeliveryDecorator
- Inherits:
-
Drape::Decorator
- Object
- Drape::Decorator
- Corzinus::DeliveryDecorator
- Defined in:
- app/decorators/corzinus/delivery_decorator.rb
Instance Method Summary collapse
Instance Method Details
#duration ⇒ Object
5 6 7 8 9 10 |
# File 'app/decorators/corzinus/delivery_decorator.rb', line 5 def duration to_text = I18n.t('corzinus.checkouts.delivery.from') from_text = I18n.t('corzinus.checkouts.delivery.to') days_text = I18n.t('corzinus.checkouts.delivery.days') [to_text, min_days, from_text, max_days, days_text].join(' ') end |
#order_subtotal(order) ⇒ Object
12 13 14 |
# File 'app/decorators/corzinus/delivery_decorator.rb', line 12 def order_subtotal(order) order.calc_total_cost(:coupon) + price end |