Sha256: c2f74d60cf4b779f392e1f316c902e7cc9f40fabaf467afc479cbcd53cd0acc2

Contents?: true

Size: 677 Bytes

Versions: 5

Compression:

Stored size: 677 Bytes

Contents

# -*- encoding: utf-8 -*-
# -*- frozen_string_literal: true -*-
# -*- warn_indent: true -*-

module RailsBootstrapForm
  module Inputs
    module Select
      extend ActiveSupport::Concern

      included do
        def select(attribute, choices = nil, options = {}, html_options = {}, &block)
          bootstrap = bootstrap_form_options.scoped(options.delete(:bootstrap))
          return super if bootstrap.disabled?

          bootstrap.set_field_class!("form-select")

          field_wrapper_builder(attribute, bootstrap, options, html_options) do
            super(attribute, choices, options, html_options, &block)
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rails_bootstrap_form-0.9.9 lib/rails_bootstrap_form/inputs/select.rb
rails_bootstrap_form-0.9.8 lib/rails_bootstrap_form/inputs/select.rb
rails_bootstrap_form-0.9.7 lib/rails_bootstrap_form/inputs/select.rb
rails_bootstrap_form-0.9.6 lib/rails_bootstrap_form/inputs/select.rb
rails_bootstrap_form-0.9.5 lib/rails_bootstrap_form/inputs/select.rb