Simple question really - how do I use the select(ActionView::Helpers::FormOptionsHelper) with grouped options?
I have got it working with a select_tag (ActionView::H
You can also use a Hash instead of nested arrays:
grouped_options = {
'North America' => [['United States','US'], 'Canada'],
'Europe' => ['Denmark','Germany','France']
}
<%= select_tag "foo[bar]",
grouped_options_for_select(grouped_options, 'Denmark') %>
Here, there is also a selected option ('Denmark')