Class: Trestle::Form::Fields::TagSelect

Inherits:
Select show all
Defined in:
lib/trestle/form/fields/tag_select.rb

Instance Attribute Summary

Attributes inherited from Select

#choices, #html_options

Attributes inherited from Trestle::Form::Field

#block, #builder, #name, #options, #template

Instance Method Summary collapse

Methods inherited from Select

#default_choices, #field

Methods inherited from Trestle::Form::Field

#defaults, #errors, #field, #form_group, #normalize_options!, #readonly?, #render

Constructor Details

#initialize(builder, template, name, options = {}, html_options = {}) ⇒ TagSelect

Returns a new instance of TagSelect.



7
8
9
# File 'lib/trestle/form/fields/tag_select.rb', line 7

def initialize(builder, template, name, options={}, html_options={})
  super(builder, template, name, nil, options, html_options)
end

Instance Method Details

#default_html_optionsObject



11
12
13
# File 'lib/trestle/form/fields/tag_select.rb', line 11

def default_html_options
  super.merge(multiple: true, class: "tag-select", disabled: readonly?, data: { tags: true })
end