Class: ActiveModel::Validations::PresenceValidator
- Inherits:
-
EachValidator
- Object
- ActiveModel::Validator
- EachValidator
- ActiveModel::Validations::PresenceValidator
- Defined in:
- activemodel/lib/active_model/validations/presence.rb
Instance Attribute Summary
Attributes inherited from EachValidator
Attributes inherited from ActiveModel::Validator
Instance Method Summary collapse
Methods inherited from EachValidator
#check_validity!, #initialize, #validate_each
Methods inherited from ActiveModel::Validator
Constructor Details
This class inherits a constructor from ActiveModel::EachValidator
Instance Method Details
#validate(record) ⇒ Object
7 8 9 |
# File 'activemodel/lib/active_model/validations/presence.rb', line 7 def validate(record) record.errors.add_on_blank(attributes, ) end |