Class: ViewComponent::Form::ErrorMessageComponent
- Inherits:
-
FieldComponent
- Object
- BaseComponent
- FieldComponent
- ViewComponent::Form::ErrorMessageComponent
- Defined in:
- app/components/view_component/form/error_message_component.rb
Instance Attribute Summary
Attributes inherited from FieldComponent
Attributes inherited from BaseComponent
Instance Method Summary collapse
Methods inherited from FieldComponent
#initialize, #label_text, #method_errors, #method_errors?, #object_method_names, #optional?, #required?, #validators, #value
Methods inherited from BaseComponent
#html_class, #initialize, #object_errors, #object_errors?
Methods included from ClassNamesHelper
#build_tag_values, #class_names
Constructor Details
This class inherits a constructor from ViewComponent::Form::FieldComponent
Instance Method Details
#call ⇒ Object
11 12 13 |
# File 'app/components/view_component/form/error_message_component.rb', line 11 def call tag.public_send(self.class.tag, , **) end |
#messages ⇒ Object
19 20 21 |
# File 'app/components/view_component/form/error_message_component.rb', line 19 def safe_join(method_errors, tag.br) end |
#render? ⇒ Boolean
15 16 17 |
# File 'app/components/view_component/form/error_message_component.rb', line 15 def render? method_errors? end |