Class: PlyushkinValidator

Inherits:
ActiveModel::EachValidator
  • Object
show all
Defined in:
lib/plyushkin/validators/presence.rb

Instance Method Summary collapse

Instance Method Details

#validate_each(record, attr_name, property) ⇒ Object



2
3
4
# File 'lib/plyushkin/validators/presence.rb', line 2

def validate_each(record, attr_name, property)
  record.errors.add(attr_name, :valid, options) unless property.valid?
end