Sha256: a8f2952a5a981f37a869281bb931f04e7a3252504bc5f198cd5224dbff1c85c4

Contents?: true

Size: 854 Bytes

Versions: 43

Compression:

Stored size: 854 Bytes

Contents

module BootstrapForm
  module Select2

    if Gem::Version.new(::Rails::VERSION::STRING) >= Gem::Version.new("4.1.0")
      def select2(method, choices = nil, options = {}, html_options = {}, &block)
        form_group_builder(method, options, html_options) do
          prepend_and_append_input(options) do
            @template.select2(@object_name, method, choices, objectify_options(options), @default_options.merge(html_options), &block)
          end
        end
      end
    else
      def select2(method, choices, options = {}, html_options = {}, &block)
        form_group_builder(method, options, html_options) do
          prepend_and_append_input(options) do
            @template.select2(@object_name, method, choices, objectify_options(options), @default_options.merge(html_options))
          end
        end
      end
    end

  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
egov_utils-0.3.12 lib/bootstrap_form/select2.rb
egov_utils-0.3.10 lib/bootstrap_form/select2.rb
egov_utils-0.3.9 lib/bootstrap_form/select2.rb
egov_utils-0.3.8 lib/bootstrap_form/select2.rb
egov_utils-0.3.7 lib/bootstrap_form/select2.rb
egov_utils-0.3.6 lib/bootstrap_form/select2.rb
egov_utils-0.3.5 lib/bootstrap_form/select2.rb
egov_utils-0.3.4 lib/bootstrap_form/select2.rb
egov_utils-0.3.3 lib/bootstrap_form/select2.rb
egov_utils-0.3.2 lib/bootstrap_form/select2.rb
egov_utils-0.3.1 lib/bootstrap_form/select2.rb
egov_utils-0.3.0 lib/bootstrap_form/select2.rb
egov_utils-0.2.13 lib/bootstrap_form/select2.rb
egov_utils-0.2.12 lib/bootstrap_form/select2.rb
egov_utils-0.2.11 lib/bootstrap_form/select2.rb
egov_utils-0.2.10 lib/bootstrap_form/select2.rb
egov_utils-0.2.9 lib/bootstrap_form/select2.rb
egov_utils-0.2.8 lib/bootstrap_form/select2.rb
egov_utils-0.2.7 lib/bootstrap_form/select2.rb
egov_utils-0.2.6 lib/bootstrap_form/select2.rb