Sha256: ae0f2b78e454376b57845d36de05d2e0abc1f47dd50a4b9193a83317943875a1

Contents?: true

Size: 470 Bytes

Versions: 6

Compression:

Stored size: 470 Bytes

Contents

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

6 entries across 6 versions & 1 rubygems

Version Path
trestle-0.8.12 lib/trestle/form/fields/tag_select.rb
trestle-0.8.11 lib/trestle/form/fields/tag_select.rb
trestle-0.8.10 lib/trestle/form/fields/tag_select.rb
trestle-0.8.9 lib/trestle/form/fields/tag_select.rb
trestle-0.8.8 lib/trestle/form/fields/tag_select.rb
trestle-0.8.7 lib/trestle/form/fields/tag_select.rb