Sha256: a6383922880bac182e7acb32c0b11854566dba2da1b46e8f557fc0d5fa95f219
Contents?: true
Size: 491 Bytes
Versions: 75
Compression:
Stored size: 491 Bytes
Contents
InlineForms::SPECIAL_COLUMN_TYPES[:check_box]=:boolean # boolean, bit unaptly named check_box def check_box_show(object, attribute) values = attribute_values(object, attribute) link_to_inline_edit object, attribute, values[object.send(attribute) ? 1 : 0 ][1] end def check_box_edit(object, attribute) check_box_tag attribute.to_s, 1, object.send(attribute) end def check_box_update(object, attribute) object[attribute.to_s.to_sym] = params[attribute.to_s.to_sym].nil? ? 0 : 1 end
Version data entries
75 entries across 75 versions & 1 rubygems