Method: SimpleForm::Inputs::StringInput#input

Defined in:
lib/simple_form/inputs/string_input.rb

#inputObject



4
5
6
7
8
9
10
# File 'lib/simple_form/inputs/string_input.rb', line 4

def input
  input_html_options[:size]      ||= [limit, SimpleForm.default_input_size].compact.min
  input_html_options[:maxlength] ||= limit if limit
  input_html_options[:type]      ||= input_type unless string?

  @builder.text_field(attribute_name, input_html_options)
end