Class: Railsboot::FormField::TextAreaComponent
- Inherits:
-
FieldComponent
- Object
- FieldComponent
- Railsboot::FormField::TextAreaComponent
- Defined in:
- app/components/railsboot/form_field/text_area_component.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(form:, name:, **html_attributes) ⇒ TextAreaComponent
constructor
A new instance of TextAreaComponent.
Constructor Details
#initialize(form:, name:, **html_attributes) ⇒ TextAreaComponent
Returns a new instance of TextAreaComponent.
2 3 4 5 6 7 8 9 10 11 |
# File 'app/components/railsboot/form_field/text_area_component.rb', line 2 def initialize(form:, name:, **html_attributes) @form = form @name = name @html_attributes = html_attributes @html_attributes[:class] = class_names( "form-control", html_attributes[:class] ) end |
Instance Method Details
#call ⇒ Object
13 14 15 |
# File 'app/components/railsboot/form_field/text_area_component.rb', line 13 def call @form.text_area @name, **@html_attributes end |