class ActiveModel::Validations::AbsenceValidator

Public Instance Methods

validate_each(record, attr_name, value) click to toggle source
# File lib/active_model/validations/absence.rb, line 8
def validate_each(record, attr_name, value)
  record.errors.add(attr_name, :present, options) if value.present?
end