Selected value in a combobox


#1

I’m using ActiveScaffold.

In the file house_helper.rb I have written the code:

def house_form_column(record, input_name)

list = House.find(:all, :include => ‘city’)
new_list=…

list do |element|
if record = element.name
selec=element.id
end
end
select_tag ‘X’,options_for_select(new_list, selected=selec),
{:multiple => false}

to visualize a combobox with some data. The information is visualised
correctly but I can’t select a value in the combobox, it doesn’t work.