Class: ExpressTemplates::Components::Forms::Checkbox
- Inherits:
-
FormComponent
- Object
- Expander
- Base
- FormComponent
- ExpressTemplates::Components::Forms::Checkbox
- Defined in:
- lib/express_templates/components/forms/checkbox.rb
Instance Attribute Summary
Attributes inherited from Expander
#handlers, #locals, #stack, #template
Instance Method Summary collapse
- #checked_value ⇒ Object
- #field_options ⇒ Object
- #label_after? ⇒ Boolean
- #label_before? ⇒ Boolean
- #unchecked_value ⇒ Object
Methods inherited from FormComponent
#compile, #field_name, #field_name_attribute, #field_wrapper_class, #label_name, #label_text, #parent_form, #resource_class, #resource_name, #resource_var
Methods included from Capabilities::Adoptable
Methods included from Capabilities::Configurable
Methods inherited from Base
Methods included from Capabilities::Iterating
Methods included from Capabilities::Wrapping
Methods included from Capabilities::Rendering
Methods included from Capabilities::Templating
Methods included from Macro
Methods inherited from Expander
#expand, #initialize, #initialize_expander, #method_missing, #process_children!, register_macros_for
Constructor Details
This class inherits a constructor from ExpressTemplates::Expander
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ExpressTemplates::Expander
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 {} 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 |