I am following this tutorial on rails (http://tutorials.jumpstartlab.com/projects/merchant.html) and running into an error I have been getting for a while now. The error message that I am getting is below stating
uninitialized constant OrderItem::ProductId
and my code below. It highlights the line starting with @order_item as well.
# POST /order_items.json
def create
@order_item = OrderItem.new(product_id: params[:product_id], order_id: @order_id)
respond_to do |format|
if @order_item.save
And it tells me this as well.
Request Parameters:
{"authenticity_token"=>"yCeOPJCrLoK2jYBXnjPVra8jtPjOa98UCXXRA51ySxY=",
"product_id"=>"1"}
Does anyone have a clue as to what is going on here? A couple other people checked it out and couldn't help me so I'm hoping someone could lead me in the right direction here.