Class: Formatic::Wrappers::Validators
- Inherits:
-
Object
- Object
- Formatic::Wrappers::Validators
- Includes:
- Calls
- Defined in:
- lib/formatic/wrappers/validators.rb
Overview
Examines the validators of a record.
Instance Method Summary collapse
-
#call ⇒ Object
This could later be made smarter (e.g. checking for conditionals) See github.com/heartcombo/simple_form/blob/main/lib/simple_form/helpers/validators.rb#L15.
Instance Method Details
#call ⇒ Object
This could later be made smarter (e.g. checking for conditionals) See github.com/heartcombo/simple_form/blob/main/lib/simple_form/helpers/validators.rb#L15
14 15 16 17 18 |
# File 'lib/formatic/wrappers/validators.rb', line 14 def call return [] unless object.class.respond_to?(:validators_on) attribute_validators + association_validators end |