Sha256: 81f0324e1b0a82e4a64b164fd9376b12a04675b170022b9f79e19755e8eb873d

Contents?: true

Size: 473 Bytes

Versions: 2

Compression:

Stored size: 473 Bytes

Contents

module ExtForm
  module Helpers
    module Tags
      class CollectionSelect < ActionView::Helpers::Tags::CollectionSelect
        def render
          output = super

          html_options = {}
          add_default_name_and_id(html_options)

          output << @template_object.javascript_tag do
            "$(function(){$('##{html_options['id']}').trigger('select2_load');});".html_safe
          end
          output.html_safe
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ext_form-0.1.5 lib/ext_form/helpers/tags/collection_select.rb
ext_form-0.1.4 lib/ext_form/helpers/tags/collection_select.rb