Sha256: 3902b5c7ff6921af29d5fab749d70f6d082a9a90ffbad8b9a0505a0841a87bd0
Contents?: true
Size: 679 Bytes
Versions: 7
Compression:
Stored size: 679 Bytes
Contents
module CurationConcerns class FormBuilder < SimpleForm::FormBuilder def input_label(attribute_name, options = {}) options = options.dup options[:input_html] = options.except(:as, :boolean_style, :collection, :label_method, :value_method, *ATTRIBUTE_COMPONENTS) options = @defaults.deep_dup.deep_merge(options) if @defaults input = find_input(attribute_name, options) wrapper = find_wrapper(input.input_type, options) components = (wrapper.components.map(&:namespace) & ATTRIBUTE_COMPONENTS) + [:input] components.map { |component| SimpleForm::Wrappers::Leaf.new(component) } input.label.html_safe end end end
Version data entries
7 entries across 7 versions & 1 rubygems