Sha256: 297099ea8494151305244ce056f987fac04260b9031ffd9fcddf5f9eb39dd09a
Contents?: true
Size: 445 Bytes
Versions: 17
Compression:
Stored size: 445 Bytes
Contents
module SimpleForm class PlaceholderFormBuilder < SimpleForm::DefaultFormBuilder def input(attribute_name, options = {}, &block) if options[:placeholder].nil? options[:placeholder] ||= object.class.respond_to?(:human_attribute_name) ? object.class.human_attribute_name(attribute_name.to_s) : attribute_name.to_s.humanize end options[:label] = false if options[:label].nil? super end end end
Version data entries
17 entries across 17 versions & 1 rubygems