lib/formtastic.rb
# Outputs a label containing a checkbox and the label text. The label defaults
# to the column name (method name) and can be altered with the :label option.
# :checked_value and :unchecked_value options are also available.
#
Outputs a label containing a checkbox and the label text. The label defaults
to the column name (method name) and can be altered with the :label option.
:checked_value and :unchecked_value options are also available.
Outputs a label containing a checkbox and the label text . The label defaults to the column name ( method name ) and can be altered with the : label option . : checked_value and : unchecked_value options are also available .
def boolean_input(method, options)
      html_options = options.delete(:input_html) || {}
      input = self.check_box(method, set_options(options).merge(html_options),
                             options.delete(:checked_value) || '1', options.delete(:unchecked_value) || '0')
      label = options.delete(:label) || humanized_attribute_name(method)
      self.label(method, input + label, options_for_label(options))
    end
def boolean_input ( method , options ) html_options = options . delete ( :input_html ) || { } input = self . check_box ( method , set_options ( options ) . merge ( html_options ) , options . delete ( :checked_value ) || '1' , options . delete ( :unchecked_value ) || '0' ) label = options . delete ( :label ) || humanized_attribute_name ( method ) self . label ( method , input + label , options_for_label ( options ) ) end
Outputs a label containing a checkbox and the label text.
Outputs a label containing a checkbox and the label text .
method
options