Forum: Ruby on Rails parent - child help (RoR & MySQL)

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
fricancrobat (Guest)
on 2006-04-10 18:00
I'm having some trouble getting a parent-child relationship working.
I've got 5 tables, 1 being the main table and 4 being lookup tables for
the main.  in the chart below, each of the xxxx_id fields has a
corresponding table.  I would like to be able to show just the result of
the relationship.  this is also outlined below.


[id_of_object]    object_id    region_id    state_id    vendor_id
                      |            |           |            |
                      |            |           |            |
                      |            |           |            |
                     /              \          |           /
                    /                --------- | ----------
                   /                          \|/
                  id   object             same as object

what should show on display:

(id_of_object)    object    region    state    vendor    other_info

This topic is locked and can not be replied to.