From: Todd Benson Date: 2008-07-01T05:38:58+09:00 Subject: Re: Tables: Unnecessary duplication of id fields On Mon, Jun 30, 2008 at 12:10 PM, brian wrote: > Maybe it will be clearer if I will just begin with the symptom. > > I am getting an error saying "Couldn't find Itemprice without an ID" > > This message comes up even despite the fact that this is my controller: > > class ItempriceController < ApplicationController > def show > @itemprices = Itemprice.find(params[:ItemSerial]) > end > end > > > I am not finding Itemprice by id according to the above, but still I get > this error. > > In my view as a test I have the following: > > <% @page_title = "#{@itemprices.Price1}" %> > > -Brian Hmm. I'm no Rails expert, but maybe you should check the type/class of the object params[:ItemSerial]. Just a thought. Also, your database setup may be strange for Rails as I alluded to earlier. I've actually had this error a few times before, but can't remember how I fixed it :/ Todd