Module: Edr::AR::DataValidator

Defined in:
lib/edr/ar/data_validator.rb

Class Method Summary collapse

Class Method Details

.validate(model) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/edr/ar/data_validator.rb', line 4

def self.validate model
  data = model._data
  if data.valid?
    []
  else
    data.errors.full_messages
  end
end