Sha256: a1c1cfd586d7e878996448758bcc38b76e2dbbe069b28c956d6eb690961e70bd

Contents?: true

Size: 643 Bytes

Versions: 5

Compression:

Stored size: 643 Bytes

Contents

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

module RailsBootstrapForm
  module Inputs
    module RangeField
      extend ActiveSupport::Concern

      included do
        def range_field(attribute, options = {})
          bootstrap = bootstrap_form_options.scoped(options.delete(:bootstrap))
          return super if bootstrap.disabled?

          bootstrap.set_field_class!("form-range")
          bootstrap.disable_floating_labels!

          field_wrapper_builder(attribute, bootstrap, options) do
            super(attribute, options)
          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/range_field.rb
rails_bootstrap_form-0.9.8 lib/rails_bootstrap_form/inputs/range_field.rb
rails_bootstrap_form-0.9.7 lib/rails_bootstrap_form/inputs/range_field.rb
rails_bootstrap_form-0.9.6 lib/rails_bootstrap_form/inputs/range_field.rb
rails_bootstrap_form-0.9.5 lib/rails_bootstrap_form/inputs/range_field.rb