Re: Tables: Unnecessary duplication of id fields
- From: brian <brian@xxxxxxxxxxxxxxxx>
- Date: Mon, 30 Jun 2008 12:10:32 -0500
=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
.
- Follow-Ups:
- Re: Tables: Unnecessary duplication of id fields
- From: Todd Benson
- Re: Tables: Unnecessary duplication of id fields
- References:
- Tables: Unnecessary duplication of id fields
- From: brian
- Re: Tables: Unnecessary duplication of id fields
- From: Todd Benson
- Tables: Unnecessary duplication of id fields
- Prev by Date: Something like import/package in java?
- Next by Date: Re: is it possible to create a hash dynamically?
- Previous by thread: Re: Tables: Unnecessary duplication of id fields
- Next by thread: Re: Tables: Unnecessary duplication of id fields
- Index(es):