Sha256: 75b345a8b47dd9a2d52fb6279babaf78b3c36d5071edf953068c5f6721257eb1
Contents?: true
Size: 508 Bytes
Versions: 2
Compression:
Stored size: 508 Bytes
Contents
module SimpleForm module Inputs class StringInput < Base enable :placeholder, :maxlength, :pattern def input unless string? input_html_classes.unshift("string") input_html_options[:type] ||= input_type if html5? end input_html_classes.unshift("text") if aui? add_size! @builder.text_field(attribute_name, input_html_options) end private def string? input_type == :string end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
simple_form_awesome-2.5.0 | lib/simple_form/inputs/string_input.rb |
simple_form_awesome-2.4.0 | lib/simple_form/inputs/string_input.rb |