Flowdock
method

add_default_name_and_id

Importance_0
v2.2.1 - Show latest stable - 0 notes - Class: ActionView::Helpers::InstanceTag
add_default_name_and_id(options) 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_helper.rb, line 680
        def add_default_name_and_id(options)
          if options.has_key?("index")
            options["name"] ||= tag_name_with_index(options["index"])
            options["id"]   ||= tag_id_with_index(options["index"])
            options.delete("index")
          elsif defined?(@auto_index)
            options["name"] ||= tag_name_with_index(@auto_index)
            options["id"]   ||= tag_id_with_index(@auto_index)
          else
            options["name"] ||= tag_name + (options.has_key?('multiple') ? '[]' : '')
            options["id"]   ||= tag_id
          end
        end
Register or log in to add new notes.