method

build_options

Importance_2
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: ActionView::Helpers

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v6.1.7.7) is shown here.

These similar methods exist in v7.1.3.2:

build_options(selected, options = {}) private

Build select option HTML from date value and options.

build_options(15, start: 1, end: 31)
=> "<option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>..."

If use_two_digit_numbers: true option is passed

build_options(15, start: 1, end: 31, use_two_digit_numbers: true)
=> "<option value="1">01</option>
    <option value="2">02</option>
    <option value="3">03</option>..."

If :step options is passed

build_options(15, start: 1, end: 31, step: 2)
=> "<option value="1">1</option>
    <option value="3">3</option>
    <option value="5">5</option>..."
Show source
Register or log in to add new notes.