Sha256: c9b84606364d50e6c64a18b5e92f3da9c57d2e154319b5467942e5855cc9bf61
Contents?: true
Size: 645 Bytes
Versions: 64
Compression:
Stored size: 645 Bytes
Contents
module BootstrapForm module CheckBoxPatch # TODO: check upstream - it is on master on 29-1-2018 - only required is not there def check_box(name, options = {}, checked_value = "1", unchecked_value = "0", &block) options = options.symbolize_keys! check_box_options = options.except(:label, :label_class, :wrapper_class, :help, :inline) label_classes = [options[:label_class], 'form-check-label'] unless options.delete(:skip_required) label_classes << "required" if required_attribute?(object, name) end options[:label_class] = label_classes.compact.join(' ') super end end end
Version data entries
64 entries across 64 versions & 1 rubygems