11 Dec 2012, 23:22
Generic-user-small

Matt Cushing (5 posts)

Getting Error: test_should_create_line_item(LineItemsControllerTest): NoMethodError: undefined method line_items' for 980190963:Fixnum /Users/matt/work/storefront/app/controllers/line_items_controller.rb:45:in create’

Here is the code: def create @cart = current_cart product = Product.find(params[:product_id]) @line_item = @cart.line_items.build (doesn’t like this row) @line_item.product = product

  You must be logged in to comment