Sha256: c7e9af5224d8e497dc740b2fdcbb25bcb42d20c16e6b1fdac2d45508d32a745d

Contents?: true

Size: 451 Bytes

Versions: 4

Compression:

Stored size: 451 Bytes

Contents

module Trestle
  class Form
    module Fields
      module RadioButtonHelpers
        def inline?
          options[:inline]
        end

        def default_wrapper_class
          [
            "form-check",
            ("form-check-inline" if inline?)
          ].compact
        end

        def input_class
          ["form-check-input"]
        end

        def label_class
          ["form-check-label"]
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
trestle-0.10.1 lib/trestle/form/fields/radio_button_helpers.rb
trestle-0.10.0 lib/trestle/form/fields/radio_button_helpers.rb
trestle-0.10.0.pre2 lib/trestle/form/fields/radio_button_helpers.rb
trestle-0.10.0.pre lib/trestle/form/fields/radio_button_helpers.rb