I have the follwoing select in my view
<%= select(‘role’, ‘name’, Role::DEFAULT_COMPANY_NAMES, { :prompt =>
l(:select_a_role) }, {:style => ‘width:150px;’}) %>
<%= select(‘role’, ‘company_id’, @company_choices, { :prompt =>
l(:select_a_company) }, {:style => ‘width:200px;’}) %>
on first display I have the prompt, Ok
but when the user forget to select one of 2 seeltions, I would like
to redisplay the already selected one…
I tried
@role_name = params[:role][:name]
@role_company_id = params[:role][:company_id]
before redisplay but no pre-selctiuon is being made ( because of the
prompt… ??)
thanks
erwin