Module: Padrino::Helpers::FormHelpers::Options

### Home Classes Methods

### In Files

- lib/padrino-helpers/form_helpers/options.rb

### Methods

- #extract_option_tags!

### Files

- README.rdoc

### Class/Module Index

Quicksearch

- Padrino
- Padrino::Helpers
- Padrino::Helpers::AssetTagHelpers
- Padrino::Helpers::FormBuilder
- Padrino::Helpers::FormBuilder::AbstractFormBuilder
- Padrino::Helpers::FormBuilder::DeprecatedBuilderMethods
- Padrino::Helpers::FormBuilder::StandardFormBuilder
- Padrino::Helpers::FormHelpers
- Padrino::Helpers::FormHelpers::Errors
- Padrino::Helpers::FormHelpers::Options
- Padrino::Helpers::FormHelpers::Security
- Padrino::Helpers::NumberHelpers
- Padrino::Helpers::OutputHelpers
- Padrino::Helpers::OutputHelpers::AbstractHandler
- Padrino::Helpers::OutputHelpers::ErbHandler
- Padrino::Helpers::OutputHelpers::HamlHandler
- Padrino::Helpers::OutputHelpers::SinatraCurrentEngine
- Padrino::Helpers::OutputHelpers::SlimHandler
- Padrino::Helpers::RenderHelpers
- Padrino::Helpers::TagHelpers
- Padrino::Helpers::TranslationHelpers
- Padrino::Rendering
- Padrino::Rendering::ClassMethods
- Padrino::Rendering::ErubisTemplate
- Padrino::Rendering::HamlTemplate
- Padrino::Rendering::InstanceMethods
- Padrino::Rendering::SafeBufferEnhancer
- Padrino::Rendering::SafeEruby
- Padrino::Rendering::SafeTemplate
- Padrino::Rendering::SlimTemplate
- Padrino::Rendering::TemplateNotFound
- Haml
- Haml::Helpers
- Haml::Util

No matching classes.

# Padrino::Helpers::FormHelpers::Options

Helpers to generate options list for select tag.

### Public Instance Methods

extract_option_tags!(options) click to toggle source

    # File lib/padrino-helpers/form_helpers/options.rb, line 8
    def extract_option_tags!(options)
      state = extract_option_state!(options)
      option_tags = if options[:grouped_options]
        grouped_options_for_select(options.delete(:grouped_options), state)
      else
        options_for_select(extract_option_items!(options), state)
      end
      if prompt = options.delete(:include_blank)
        option_tags.unshift(blank_option(prompt))
      end
      option_tags
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.