Class: Sidebar::ParamField::CheckBoxField
Instance Attribute Summary
#default, #key, #options
Instance Method Summary
collapse
build, class_for, #initialize, #input_name, #label, #label_html
Instance Method Details
#canonicalize(value) ⇒ Object
95
96
97
98
99
100
101
102
|
# File 'lib/sidebar.rb', line 95
def canonicalize(value)
case value
when "0"
false
else
true
end
end
|
86
87
88
89
|
# File 'lib/sidebar.rb', line 86
def input_html()
hidden_field_tag(input_name(),0)+
check_box_tag(input_name(), 1, .config[key], options)
end
|
#line_html(sidebar) ⇒ Object
91
92
93
|
# File 'lib/sidebar.rb', line 91
def line_html()
input_html() + ' ' + label_html() + '<br >'
end
|