method

add_options

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

Method deprecated or moved

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

These similar methods exist in v7.1.3.2:

add_options(option_tags, options, value = nil) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_view/helpers/form_options_helper.rb, line 617
        def add_options(option_tags, options, value = nil)
          if options[:include_blank]
            option_tags = content_tag_string('option', options[:include_blank].kind_of?(String) ? options[:include_blank] : nil, :value => '') + "\n" + option_tags
          end
          if value.blank? && options[:prompt]
            prompt = options[:prompt].kind_of?(String) ? options[:prompt] : I18n.translate('helpers.select.prompt', :default => 'Please select')
            option_tags = content_tag_string('option', prompt, :value => '') + "\n" + option_tags
          end
          option_tags
        end
Register or log in to add new notes.