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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community 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.

table_example:

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

what should show on display:

(id_of_object)    object    region    state    vendor    other_info


Thanks!
This topic is locked and can not be replied to.