Class: Form::CheckboxComponent
- Inherits:
-
InputComponent
- Object
- InputComponent
- Form::CheckboxComponent
- Defined in:
- app/components/spark/form/checkbox_component.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#input_attrs ⇒ Object
11 12 13 14 15 |
# File 'app/components/spark/form/checkbox_component.rb', line 11 def input_attrs tag_attrs.merge({ type: "checkbox" }) end |
#render ⇒ Object
5 6 7 8 9 |
# File 'app/components/spark/form/checkbox_component.rb', line 5 def render component "form/label", text: label do concat tag(:input, input_attrs) end end |