ActionView::Helpers::FormOptionsHelper
grouped_options_for_select
API docs (Rails 8.1.4.1) ↗def grouped_options_for_select(grouped_options, selected_key = nil, options = {})
Description
Creates an <optgroup> for each group, containing its <option> elements.
ERB
Changes from the previous output: Added Removed Changed
HTML
Preview
Interacting with the preview updates the form submission.
Form submission
Form data
| name | value |
|---|
Request body
Content-Type:
params