class Olelo::Attributes::Attribute::Boolean
Public Instance Methods
build_form(attr)
click to toggle source
# File lib/olelo/attributes.rb, line 73 def build_form(attr) "<div class=\"indent\">#{field_tag(attr)}#{label_tag}</div><br/>\n" end
field_tag(attr)
click to toggle source
# File lib/olelo/attributes.rb, line 69 def field_tag(attr) %{<input class="observe" type="checkbox" id="#{key}" name="#{key}" value="true"#{attr ? ' checked="checked"' : ''}/>} end
parse(params)
click to toggle source
# File lib/olelo/attributes.rb, line 77 def parse(params) value = params[key] true if value == 'true' end