ActionView::Helpers::FormOptionsHelper
Comparison table
Helpers that create a <select> build the <option> elements by calling a helper that creates only <option> elements, then wrap them in a <select>. The output of the helpers that create only <option> elements is passed to helpers such as select_tag. The names do not follow a consistent pattern, so you cannot tell from the names alone which goes with which.
Helpers that create a <select> | Helpers that create only <option> elements (output passed to helpers such as select_tag) | Called internally by the helper that creates only <option> elements |
|---|---|---|
| From an array or a hash | ||
select | options_ | − (creates the <option> elements itself) |
select (grouped format) | grouped_ | options_ (for each group) |
| From a list of objects | ||
collection_ | options_ | options_ |
grouped_ | option_ | options_ (for each item) |
| Others | ||
time_ | time_ | options_ |
weekday_ | weekday_ | options_ |
Most <option> elements are ultimately created by options_. The <option> with an empty value that include_blank and prompt add at the top comes from the helper that creates the <select>. The prompt of grouped_options_for_select and the divider <option> of time_zone_options_for_select (-------------) are created by those helpers themselves.