Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TypeError at /api/cart_items
- ============================
- > nil can't be coerced into Fixnum
- app/brill/brill/cart_items_builder.rb, line 35
- ----------------------------------------------
- ``` ruby
- 30 i[:product_name] = product.name
- 31 i[:product_price] = '%.2f' % product.price_for_customer.to_d
- 32 i[:product_packaging] = product.packaging
- 33 i[:product_item] = product.item
- 34 i[:product_sold_as_whole_packages] = product.sold_as_whole_packages
- > 35 if (item.quantity % product.packaging) == 0
- 36 i[:boxes_count] = item.quantity / product.packaging
- 37 end
- 38 end
- 39 i
- 40 end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement