Formtastic select with grouping
问题 Now with Formtastic I have plain select: = f.input :category, :as => :select, :include_blank => false, :collection => subcategories Here I show only children categories. I use acts_as_tree plugin for parent-child relationship. I would like to show parent categories as well. Formtastic generated select should look like this one: <select name="favoritefood"> <optgroup label="Dairy products"> <option>Cheese</option> <option>Egg</option> </optgroup> <optgroup label="Vegetables"> <option>Cabbage<