Class: SidebarField::CheckBoxField
- Inherits:
-
SidebarField
- Object
- SidebarField
- SidebarField::CheckBoxField
- Defined in:
- lib/sidebar_field.rb
Instance Attribute Summary
Attributes inherited from SidebarField
Instance Method Summary collapse
Methods inherited from SidebarField
build, class_for, #current_value, #initialize, #input_html, #input_name, #label, #label_html
Constructor Details
This class inherits a constructor from SidebarField
Instance Method Details
#canonicalize(value) ⇒ Object
90 91 92 93 94 95 96 97 |
# File 'lib/sidebar_field.rb', line 90 def canonicalize(value) case value when "0" false else true end end |
#line_html(sidebar) ⇒ Object
83 84 85 86 87 88 |
# File 'lib/sidebar_field.rb', line 83 def line_html() content = hidden_field_tag(input_name(), 0) + tag.label(check_box_tag(input_name(), 1, current_value(), ) + label) tag.div(content, class: "checkbox") end |