I have a form [using start_form_tag] with a select_tag. I need to
populate the values [id and name] from a model. So far all the
examples for populating values of select box from database uses
form_for and form.collection_select method.
Is there a similar way to do that for from_tag and select_tag?
I am happy atleast if I get a method to pass a name and id to the
select_tag, so that the display is name and id is posted.
params['agent_id'] = params['blah']['agent_id'] if params.has_key?("blah")
params['agent_id'] is used by other forms and that's the place I
expect the value to be. So I check if params['blah']['agent_id'] is
defined and if so, I copy it's value to params['agent_id']
Ugly, but works. Though I would have preferred the value from the form
in params['agent_id']
Now if only I can select a particular value in my drop down list.