hello PPL, I''ve seen now that the _form.rhtml generated by script/scaffold is populated by <%= text_field ''model'', ''field'' %> without _tag! but only text_field_tag is to be found in the 1.1.2 documentation.. (like in the rest of Module ActionView::Helpers::FormTagHelper there is _tag) I''ve tried to use <%= select instead of <% select_tag and it works AND the first one generates: <select id="tesi_relatore_id" name="tesi[relatore_id]"> and the other <select id="tesi_controrelatore_id" name="tesi_controrelatore_id"> my class can be saved just using the first one. but now I''ve problem with the ''option prameter'' :< I''m a bit confused :) -- Emanuele Tozzato mob +39 329 29 56 995 icq 30 77 52 76 web mekdigital.com
found out that (what a pain!)
@relatori = Relatore.find(:all)
@relatori_select = Array.new
for relatore in @relatori
@relatori_select.push([relatore.nome << " " <<
relatore.cognome, relatore.id.to_s])
end
this is ok for <%= select
''tesi'',''relatore_id'', @relatori_select %>
AND
@correlatori = Correlatore.find(:all)
@correlatori_select = "<option value=0> - nessuno -
</option>"
for correlatore in @correlatori
@correlatori_select << "<option value=" <<
correlatore.id.to_s
<< ">" << correlatore.nome << " "
<< correlatore.cognome << "</option>"
end
works for <%= select_tag "tesi_correlatore_id", @correlatori_select
%>
mHisterycal LOL
On Jun 24, 2006, at 11:54 AM, Emanuele meK Tozzato wrote:
> I''m a bit confused :)