Sha256: 9bc9f6c9e9c04eabcec193d87f5aff7b8a15ced6201fb2f2e0daa299ab553e5d
Contents?: true
Size: 557 Bytes
Versions: 7
Compression:
Stored size: 557 Bytes
Contents
module SimpleForm module Inputs class BooleanInput < Base def input @builder.check_box(attribute_name, input_html_options) end def label_input input + (options[:label] == false ? "" : label) end protected # 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. def attribute_required_by_default? false end end end end
Version data entries
7 entries across 7 versions & 1 rubygems