class GreaterThanZeroValidator
Public Instance Methods
validate_each(record, attribute, value)
click to toggle source
# File lib/schleuder/validators/greater_than_zero_validator.rb, line 2 def validate_each(record, attribute, value) if value.to_i == 0 record.errors.add(attribute, I18n.t('errors.must_be_greater_than_zero')) end end