I have a very simple each loop written in Ruby :
params[:category].each do |i|
cat = Category.find(i)
string << cat.name
end
The strange issue is that it only ever runs through this loop once!
params[:category] should be an array of params that all came in under the category label, right?
this was generated using a select tag in the controller:
<%=select_tag "category", options_from_collection_for_select(@category,"id" , "name"),:multiple => true, :class=>"bbFormSelect",:id=>"select_category", :name => "category" %>
Let me know if you see what's wrong!
stringhave, and what did you expect it to have?