Parent

Files

SimpleForm::Inputs::BooleanInput

Public Instance Methods

input() click to toggle source
# File lib/simple_form/inputs/boolean_input.rb, line 4
def input
  @builder.check_box(attribute_name, input_html_options)
end
label_input() click to toggle source
# File lib/simple_form/inputs/boolean_input.rb, line 8
def label_input
  input + (options[:label] == false ? "" : label)
end

Protected Instance Methods

attribute_required_by_default?() click to toggle source

Booleans are not required by default because in most of the cases it makes no sense marking them as required. The only exception is Terms of Use usually presented at most sites sign up screen.

# File lib/simple_form/inputs/boolean_input.rb, line 17
def attribute_required_by_default?
  false
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.