Class: ClarkKent::UserEmailValidator
- Inherits:
-
ActiveModel::Validator
- Object
- ActiveModel::Validator
- ClarkKent::UserEmailValidator
- Defined in:
- app/validators/clark_kent/user_email_validator.rb
Instance Method Summary collapse
Instance Method Details
#validate(record) ⇒ Object
3 4 5 |
# File 'app/validators/clark_kent/user_email_validator.rb', line 3 def validate(record) record.errors[:email] << "Couldn't find a user with that email address" unless record.user.present? end |