Module: Trestle::Form::Fields::RadioButtonHelpers

Included in:
CollectionRadioButtons, RadioButton
Defined in:
lib/trestle/form/fields/radio_button_helpers.rb

Instance Method Summary collapse

Instance Method Details

#default_wrapper_classObject



9
10
11
12
13
14
# File 'lib/trestle/form/fields/radio_button_helpers.rb', line 9

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

#inline?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/trestle/form/fields/radio_button_helpers.rb', line 5

def inline?
  options[:inline]
end

#input_classObject



16
17
18
# File 'lib/trestle/form/fields/radio_button_helpers.rb', line 16

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

#label_classObject



20
21
22
# File 'lib/trestle/form/fields/radio_button_helpers.rb', line 20

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