Re: Tables: Unnecessary duplication of id fields



=begin
Thank you for the response.

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

----- Original Message -----
From: "Todd Benson" <caduceass@xxxxxxxxx>
To: "ruby-talk ML" <ruby-talk@xxxxxxxxxxxxx>
Sent: Monday, June 30, 2008 11:29 AM
Subject: Re: Tables: Unnecessary duplication of id fields

While not really a Ruby or Rails question, it seems you have
rows/tuples that point to a singular row in another table. In other
words, reverse it. Have columns in your "subtables" that is the
foreign key of the "master" one.

It's possible I misread your question, though. I do that pretty
frequently :-)

Todd



=end



.