I used
<% = collection_select: category,: sector_id, @ Sectors,: id,: name,
{: prompt => "All",: selected => @ sector}, {: id =>
'sector_admin_select'}%>

It worked perfectly, but because I don't need to use the model
category, I thought it was more suitable to use:

<% = select_tag: sector_admin_select,
options_from_collection_for_select (@ Sectors,: id,: name, @ sector)%>

this also works perfectly, and perhaps for the reason mentioned above
it is more suitable for this purpose, only that I would get a prompt that I
understand that the select_tag is not possible.
I am forced to use collection_select to have a prompt option?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to