Doubt in ror

hi,

i have 3 tables are

  1. panels - id , name

2)demographic_categories - id , name

3)panel_questins - id, demographic_category_id, panel_id

in combo box i have listed data’s from the panel table

i listbox i have listed data’s from the demographic_category table

now when i click save button these ids should be save in panels
questions database.

can anyone tell this?