Module: Padrino::Helpers::FormHelpers::Options
- Defined in:
- padrino-helpers/lib/padrino-helpers/form_helpers/options.rb
Overview
Helpers to generate options list for select tag.
Instance Method Summary collapse
Instance Method Details
#extract_option_tags!(options) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'padrino-helpers/lib/padrino-helpers/form_helpers/options.rb', line 8 def () state = extract_option_state!() = if [:grouped_options] (.delete(:grouped_options), state) else (extract_option_items!(), state) end if prompt = .delete(:include_blank) .unshift(blank_option(prompt)) end end |