Module: SimpleForm::Components::Errors
- Included in:
- Inputs::Base
- Defined in:
- lib/simple_form/components/errors.rb
Instance Method Summary collapse
Instance Method Details
#error ⇒ Object
4 5 6 |
# File 'lib/simple_form/components/errors.rb', line 4 def error error_text if has_errors? end |
#has_errors? ⇒ Boolean
8 9 10 |
# File 'lib/simple_form/components/errors.rb', line 8 def has_errors? object && object.respond_to?(:errors) && errors.present? end |