# Scaffold question

**URL:** <https://www.ruby-forum.com/t/scaffold-question/109987>\
**Category:** Rails\
**Created:** [July 20, 2007, 10:46pm UTC](https://www.ruby-forum.com/t/scaffold-question/109987 "2007-07-20T22:46:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DBC\_User](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ee7513/32.png) [@DBC\_User](https://www.ruby-forum.com/u/DBC_User)\
**Post date:** [July 20, 2007, 10:46pm UTC](https://www.ruby-forum.com/t/scaffold-question/109987/1 "2007-07-20T22:46:15Z")

</div>

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?

Thanks.
