module Trestle::Form::Fields::RadioButtonHelpers
Public Instance Methods
custom?()
click to toggle source
# File lib/trestle/form/fields/radio_button_helpers.rb, line 5 def custom? options[:custom] != false end
default_wrapper_class()
click to toggle source
# File lib/trestle/form/fields/radio_button_helpers.rb, line 13 def default_wrapper_class if custom? [ "custom-control", "custom-radio", ("custom-control-inline" if inline?) ].compact else [ "form-check", ("form-check-inline" if inline?) ].compact end end
inline?()
click to toggle source
# File lib/trestle/form/fields/radio_button_helpers.rb, line 9 def inline? options[:inline] end
input_class()
click to toggle source
# File lib/trestle/form/fields/radio_button_helpers.rb, line 28 def input_class custom? ? ["custom-control-input"] : ["form-check-input"] end
label_class()
click to toggle source
# File lib/trestle/form/fields/radio_button_helpers.rb, line 32 def label_class custom? ? ["custom-control-label"] : ["form-check-label"] end