Sha256: 3ed27769a34cb1b8afff8e9a8bc3d6e4825b5bf7526aaec7de61e9b76a6a72b6
Contents?: true
Size: 554 Bytes
Versions: 9
Compression:
Stored size: 554 Bytes
Contents
module SimpleForm module Inputs class StringInput < Base enable :placeholder, :maxlength, :pattern def input(wrapper_options = nil) unless string? input_html_classes.unshift("string") input_html_options[:type] ||= input_type if html5? end merged_input_options = merge_wrapper_options(input_html_options, wrapper_options) @builder.text_field(attribute_name, merged_input_options) end private def string? input_type == :string end end end end
Version data entries
9 entries across 9 versions & 2 rubygems