Advertisement
Guest User

api-cartitems

a guest
Jul 24th, 2014
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. TypeError at /api/cart_items
  2. ============================
  3.  
  4. > nil can't be coerced into Fixnum
  5.  
  6. app/brill/brill/cart_items_builder.rb, line 35
  7. ----------------------------------------------
  8.  
  9. ``` ruby
  10. 30 i[:product_name] = product.name
  11. 31 i[:product_price] = '%.2f' % product.price_for_customer.to_d
  12. 32 i[:product_packaging] = product.packaging
  13. 33 i[:product_item] = product.item
  14. 34 i[:product_sold_as_whole_packages] = product.sold_as_whole_packages
  15. > 35 if (item.quantity % product.packaging) == 0
  16. 36 i[:boxes_count] = item.quantity / product.packaging
  17. 37 end
  18. 38 end
  19. 39 i
  20. 40 end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement