Class: CckForms::ParameterTypeClass::String

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/cck_forms/parameter_type_class/string.rb

Overview

Represents a short text string.

Instance Method Summary collapse

Instance Method Details

#build_form(form_builder, options) ⇒ Object

HTML input element



7
8
9
10
11
# File 'lib/cck_forms/parameter_type_class/string.rb', line 7

def build_form(form_builder, options)
  set_value_in_hash options
  attrs = @extra_options.slice(:maxlength, :pattern)
  form_builder.text_field :value, {class: 'form-control'}.merge(attrs).merge(options)
end