Class: Validb::RecordValidator

Inherits:
Object
  • Object
show all
Defined in:
lib/validb/record_validator.rb

Instance Method Summary collapse

Instance Method Details

#validate(record) ⇒ Object



4
5
6
7
8
9
# File 'lib/validb/record_validator.rb', line 4

def validate(record)
  if !record.valid?
    message = "FAIL: #{record.class.name}:#{record.id} - #{record.errors.full_messages.join(',')}"
    Validb::FileSystemLoggerWorker.perform_async(message)
  end
end