![]() | Chapter 9: LoadError in LineItemsController#create |
|
09 Oct 2012, 17:21
Pierre Hedkvist (1 post) |
Expected C:/Users/Pierre/shop/depot/app/controllers/line_items_controller.rb to define LineItemsController I get this error when i press add to cart on one of the products. Im on page 112, any suggestions how i can fix this? thanks This is the code in app/models/product.rb class Product < ActiveRecord::Base
|
|
08 Nov 2012, 23:56
Scott Carlson (1 post) |
I encountered the same problem, and was able to overcome this by changing a line in the line_items_controller file to read: ”@line_item = @cart.line_items.build(product_id: product)”, rather than ”@line_item = @cart.line_items.build(product: product)” |
| You must be logged in to comment |

