First of all, options_for_select should be:
options_for_select([['Peas',1],['Butter',2],['Garlic',3]])
In this case it will give you 1 for Peas, 2 for Butter, etc.
In your case you can use it as:
options_for_select(['Peas','Butter','Garlic'].map{ |v| [v,v] })
And after all, I guess you better use `select` helper on a form
builder in your case:
<%= f.select(:name, options_for_select(...)) %>
--
Sincerely yours,
Aleksey V. Zapparov A.K.A. ixti
FSF Member #7118
Mobile Phone:
+34 677 990 688
Homepage:
http://www.ixti.net
JID:
zapp...@jabber.ru
*Origin: Happy Hacking!