I\'m trying to solve a pretty common (as I thought) task.
There\'re three models:
class Product < ActiveRecord::Base validates :name, presence
I just did the following. It worked for me..
<%= f.label :category, "Category" %> <%= f.select :category_ids, Category.order('name ASC').all.collect {|c| [c.name, c.id]}, {} %>