How to do optgroups?

I was palying around with the form field functions in rails and couldn’t
figure out a way to do an optgroup, which is a way to group options in a
select field.

Any ideas how to do this?

Thanks.

http://api.rubyonrails.com/classes/ActionView/Helpers/FormOptionsHelper.html#M000405

Peak Obsession
FormOptionsHelper.html#M000405

The API docs are very unclear, with very little information. I think
the original poster would like a real example on how to use it.

Best regards

Peter De Berdt

Peter De Berdt wrote:

Peak Obsession
FormOptionsHelper.html#M000405

The API docs are very unclear, with very little information. I think
the original poster would like a real example on how to use it.

Best regards

Peter De Berdt

I agree, and the only optgroup function there is for a collection.