Class: ShoppingCart::OrderDecorator
- Inherits:
-
Drape::Decorator
- Object
- Drape::Decorator
- ShoppingCart::OrderDecorator
- Defined in:
- app/decorators/shopping_cart/order_decorator.rb
Instance Method Summary collapse
Instance Method Details
#discount ⇒ Object
13 14 15 |
# File 'app/decorators/shopping_cart/order_decorator.rb', line 13 def discount h.number_to_percentage(object.coupon.discount, precision: 1) end |
#total_in_currency ⇒ Object
5 6 7 |
# File 'app/decorators/shopping_cart/order_decorator.rb', line 5 def total_in_currency h.number_to_currency object.total end |
#total_with_delivery ⇒ Object
9 10 11 |
# File 'app/decorators/shopping_cart/order_decorator.rb', line 9 def total_with_delivery h.number_to_currency(object.total + delivery_price) end |