Class: ExtForm::Helpers::Tags::CollectionSelect

Inherits:
ActionView::Helpers::Tags::CollectionSelect
  • Object
show all
Defined in:
lib/ext_form/helpers/tags/collection_select.rb

Instance Method Summary collapse

Instance Method Details

#renderObject



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/ext_form/helpers/tags/collection_select.rb', line 5

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