Returns a string of &lt;option&gt; tags, like
options_for_select, but wraps them with
&lt;optgroup&gt; tags.

Parameters:

grouped_options - Accepts a nested array or hash of strings. The
first value serves as the &lt;optgroup&gt; label while the
second value must be an array of options. The second value can be a nested
array of text-value pairs. See options_for_select
for more info.

Ex.["North America",[["United States","US"],["Canada","CA"]]]

selected_key - A value equal to the value attribute for
one of the &lt;option&gt; tags, which will have the
selected attribute set. Note: It is possible for this value to
match multiple options as you might have the same option in multiple
groups. Each will then get selected=&quot;selected&quot;.

prompt - set to true or a prompt string. When the select
element doesn’t have a value yet, this prepends an option with a
generic prompt - "Please select"
- or the given prompt string.