ActionView::Helpers::FormOptionsHelper
options_for_select
API docs (Rails 8.1.4.1) ↗def options_for_select(container, selected = nil)
Description
Creates <option> elements from an array or a hash.
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