Module: Stall::Models::Cart
Instance Method Summary collapse
Instance Method Details
#active? ⇒ Boolean
21 22 23 |
# File 'app/models/stall/models/cart.rb', line 21 def active? !paid? end |
#total_weight ⇒ Object
15 16 17 18 19 |
# File 'app/models/stall/models/cart.rb', line 15 def total_weight line_items.reduce(0) do |total, line_item| total + (line_item.weight || Stall.config.default_product_weight) end end |