Sha256: 16046e9e2810ac8b1b8e310cc31f04aea05170fd4298afb4a9189db1805406ee
Contents?: true
Size: 186 Bytes
Versions: 1
Compression:
Stored size: 186 Bytes
Contents
module ShoppingCart module OrdersHelper def calculate_discount(order) order.discount_amount ? order.subtotal_price * (order.discount_amount.to_f / 100) : 0 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shopping_cart-0.1.0 | app/helpers/shopping_cart/orders_helper.rb |