Class: SimpleBootstrapForm::Fields::BaseField
- Inherits:
-
Object
- Object
- SimpleBootstrapForm::Fields::BaseField
- Defined in:
- lib/simple_bootstrap_form/fields/base_field.rb
Direct Known Subclasses
BooleanField, DatetimeField, EmailField, PasswordField, TextField, TextareaField
Class Attribute Summary collapse
-
.type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(form_builder, template, name, options) ⇒ BaseField
constructor
A new instance of BaseField.
- #to_s ⇒ Object
Constructor Details
#initialize(form_builder, template, name, options) ⇒ BaseField
Returns a new instance of BaseField.
9 10 11 12 13 14 |
# File 'lib/simple_bootstrap_form/fields/base_field.rb', line 9 def initialize(form_builder, template, name, ) @form_builder = form_builder @template = template @name = name = .dup end |
Class Attribute Details
.type ⇒ Object
Returns the value of attribute type.
6 7 8 |
# File 'lib/simple_bootstrap_form/fields/base_field.rb', line 6 def type @type end |
Instance Method Details
#to_s ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/simple_bootstrap_form/fields/base_field.rb', line 16 def to_s @template.content_tag :div, do field_label + input_tag + errors_block end end |