Module: ActiveModel::Validations::Reflection
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/active_model/validations/reflection.rb
Defined Under Namespace
Modules: ClassMethods, Helpers
Instance Method Summary collapse
Instance Method Details
#relevant_validators_on(attribute, *kinds) ⇒ Object
62 63 64 65 66 67 68 |
# File 'lib/active_model/validations/reflection.rb', line 62 def relevant_validators_on(attribute, *kinds) self.class.validators_on_of_kinds(attribute, *kinds).select do |validator| next true if Helpers.flat_validator?(validator) Helpers.relevant_validator?(validator, self) end end |