Drop down box controller

i am new to ruby on rails in my project i have two tables documents and
dependents
and in dependents there is a column called name and i want to populate
this column data in dropdown list and after selecting the name in the
dropdown list i want to store it in documents table column called
dependents_name for this what should be the controller and view.
please…

thanks

Use collection_select:

http://railsmanual.org/module/ActionView%3A%3AHelpers%3A%3AFormOptionsHelper