I started reading through the book this past weekend and have managed to make some good progress, but now I’m stuck. I’m on page 154, trying to place orders but I get this issue. I’ve compared my code w/ the book and example code with no luck. It gives the following complaint:
ActiveRecord::AssociationTypeMismatch in StoreController#save_order LineItem(#20308640) expected, got BigDecimal(#8473270) ... app/models/order.rb:16:in `add_line_items_from_cart' app/models/order.rb:14:in `each' app/models/order.rb:14:in `add_line_items_from_cart' app/controllers/store_controller.rb:35:in `save_order'
I fail to see whats wrong w/ the save_order action or whats wrong in the order model - I’ve replaced both with the example code and get the same issue. What could I be missing?