Class: ExpressTemplates::Components::Forms::Checkbox
Constant Summary
Constants inherited
from Base
Base::MAP
Instance Attribute Summary
#input_attributes
Instance Method Summary
collapse
#field_helper_options, #field_id_attribute, #field_name, #field_name_attribute, #field_value, #label_name, #label_text, #parent_form, #resource, #resource_class, #resource_name
included
Methods inherited from Base
abstract_component, abstract_component?, before_build, #build, builder_method, builder_method_and_class, contains, descendants, has_attributes, inherited, #initialize, require_parent, required_parent, tag
Instance Method Details
#checked_value ⇒ Object
26
27
28
|
# File 'lib/express_templates/components/forms/checkbox.rb', line 26
def checked_value
"1"
end
|
#field_options ⇒ Object
22
23
24
|
# File 'lib/express_templates/components/forms/checkbox.rb', line 22
def field_options
{}
end
|
#label_after? ⇒ Boolean
18
19
20
|
# File 'lib/express_templates/components/forms/checkbox.rb', line 18
def label_after?
!!config[:label_after]
end
|
#label_before? ⇒ Boolean
14
15
16
|
# File 'lib/express_templates/components/forms/checkbox.rb', line 14
def label_before?
!label_after?
end
|
#unchecked_value ⇒ Object
30
31
32
|
# File 'lib/express_templates/components/forms/checkbox.rb', line 30
def unchecked_value
"0"
end
|