Sha256: e45b5de8d675faee9f12dbdcd053666cf09899cf6c43d09b2845cd7bece6e8b8

Contents?: true

Size: 1.24 KB

Versions: 9

Compression:

Stored size: 1.24 KB

Contents

# frozen_string_literal: true

module BootstrapForm
  module Inputs
    module GroupedCollectionSelect
      extend ActiveSupport::Concern
      include Base

      included do
        # Disabling Metrics/ParameterLists because the upstream Rails method has the same parameters
        # rubocop:disable Metrics/ParameterLists
        def grouped_collection_select_with_bootstrap(method, collection, group_method,
                                                     group_label_method, option_key_method,
                                                     option_value_method, options={}, html_options={})
          html_options = html_options.reverse_merge(control_class: "form-select")
          form_group_builder(method, options, html_options) do
            prepend_and_append_input(method, options) do
              grouped_collection_select_without_bootstrap(method, collection, group_method,
                                                          group_label_method, option_key_method,
                                                          option_value_method, options, html_options)
            end
          end
        end
        # rubocop:enable Metrics/ParameterLists

        bootstrap_alias :grouped_collection_select
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
bootstrap_form-5.4.0 lib/bootstrap_form/inputs/grouped_collection_select.rb
bootstrap_form-5.3.2 lib/bootstrap_form/inputs/grouped_collection_select.rb
bootstrap_form-5.3.1 lib/bootstrap_form/inputs/grouped_collection_select.rb
bootstrap_form-5.3.0 lib/bootstrap_form/inputs/grouped_collection_select.rb
bootstrap_form-5.2.3 lib/bootstrap_form/inputs/grouped_collection_select.rb
bootstrap_form-5.2.2 lib/bootstrap_form/inputs/grouped_collection_select.rb
bootstrap_form-5.2.1 lib/bootstrap_form/inputs/grouped_collection_select.rb
bootstrap_form-5.2.0 lib/bootstrap_form/inputs/grouped_collection_select.rb
bootstrap_form-5.1.0 lib/bootstrap_form/inputs/grouped_collection_select.rb