You want
<%= collection_select, ''item'', ''cata,
Category.find(:all), ''id'', ''name''
%>
John wrote:> undefined method `stringify_keys'' for [["Craved"],
["Whole Sale"]]:Array
> I did this earler in the script how come now it''s yealling?
>
> <% catas = Category.find(:all, :order=> "name").map {|u|
[u.name]} -%>
> <p><label
for="item_cata">Catagory:</label><br/>
> <%= select ''item'', ''cata'', catas
%></p>
>
> <% mcatas = SubCategory.find(:all, :order=> "name").map
{|u| [u.name]}
> -%>
> <p><label for="item_sub_cata">Sub
cata</label><br/>
> <%= text_field ''item'', ''sub_cata'',
mcatas %></p>
>
> What''s wrong with this?
--
Posted via http://www.ruby-forum.com/.