Sha256: d73f5e717128a5b87fd0667641837f16a5cfce124083571fa43d515f3496efcc

Contents?: true

Size: 499 Bytes

Versions: 9

Compression:

Stored size: 499 Bytes

Contents

require_relative "select"

module Trestle
  class Form
    module Fields
      class TagSelect < Select
        def initialize(builder, template, name, options={}, html_options={})
          super(builder, template, name, nil, options, html_options)
        end

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

Trestle::Form::Builder.register(:tag_select, Trestle::Form::Fields::TagSelect)

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
trestle-0.10.1 lib/trestle/form/fields/tag_select.rb
trestle-0.10.0 lib/trestle/form/fields/tag_select.rb
trestle-0.10.0.pre2 lib/trestle/form/fields/tag_select.rb
trestle-0.10.0.pre lib/trestle/form/fields/tag_select.rb
trestle-0.9.8 lib/trestle/form/fields/tag_select.rb
trestle-0.9.7 lib/trestle/form/fields/tag_select.rb
trestle-0.9.6 lib/trestle/form/fields/tag_select.rb
trestle-0.9.5 lib/trestle/form/fields/tag_select.rb
trestle-0.9.4 lib/trestle/form/fields/tag_select.rb