Sha256: 54d5e5a746067be228192933dccc7018536e78aac38aa0e3a36809d84f7f5780
Contents?: true
Size: 540 Bytes
Versions: 1
Compression:
Stored size: 540 Bytes
Contents
module JqueryUiForm module Inputs module BooleanInput def boolean_input(method, options = {}) basic_input_helper(:check_box, :boolean, method, options) end def check_box(method, options = {}) checked_value = options.delete(:checked_value) || "1" unchecked_value = options.delete(:unchecked_value) || "0" options[:checked] ||= options.delete(:value).to_s == checked_value.to_s super(method, options,checked_value, unchecked_value) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jquery-ui-form-0.2.5 | lib/jquery_ui_form/inputs/boolean_input.rb |