Displaying 1 result from an estimated 1 matches for "manufactturers".
Did you mean:
manufacturers
2009 Oct 06
8
How do I access a child table/model from the parent in sql s
...ge.
I have a table called manufacturers. I have another called descriptions.
The descriptions are in two languages and each description belongs to a
particular language. So two records in the Descriptions table one in
English and One in French for each manufacturer. The descriptions table
has the manufactturers id as a foreign key.
I have followed this for my Rails project but am stuck.
I have two models.
One is called Manufacturer.
One is called Description.
Manufacturer
has_many :descriptions
Description
belongs_to :manufacturer
In the manufacturers model I have the following method to look up a...