Forum: Ruby on Rails scaffold question

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.
9eb3f9018980d0ad0feae770b2971d8b?d=identicon&s=25 DBC User (Guest)
on 2007-07-20 22:46
(Received via mailing list)
I have a 2 tables, 1 table is called master and another one is called
reference. The reference table has id and description. In the master
table, there is one column which refers to the reference table. I have
created a foreign key and is good.

I created scaffold for both the table. I first went to the reference
table and entered all the reference data. Now what I would like to do
is to enter data in the master table using scaffold. Is there a way, I
can show a dropdown combo box which referes to the description from
reference table and when inserting, it should insert the correct id
(instead of description) into the master table.

Is there a easy way to do this?

This topic is locked and can not be replied to.