Sha256: 2504314cb6239670fb0427414de2680c6020b5028ea58dbe1befd840b2ef7ac0
Contents?: true
Size: 194 Bytes
Versions: 2
Compression:
Stored size: 194 Bytes
Contents
class AbsenceValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) record.errors.add(attribute, options[:message] || :absence) unless value.blank? end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ecm_courses-0.0.2.pre | lib/absence_validator.rb |
ecm_courses-0.0.1.pre | lib/absence_validator.rb |