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
93 94 95 96 97 98 99 100 |
# File 'lib/sidebar_field.rb', line 93 def canonicalize(value) case value when "0" false else true end end |
#line_html(sidebar) ⇒ Object
85 86 87 88 89 90 91 |
# File 'lib/sidebar_field.rb', line 85 def line_html() content = hidden_field_tag(input_name(), 0) + content_tag("label", check_box_tag(input_name(), 1, current_value(), ) + label) content_tag("div", content, class: "checkbox") end |