Class: Tengine::Job::Template::Vertex::VertexValidations

Inherits:
Mongoid::Errors::Validations
  • Object
show all
Defined in:
lib/tengine/job/template/vertex.rb

Instance Method Summary collapse

Instance Method Details

#translate(key, options) ⇒ Object



42
43
44
45
46
# File 'lib/tengine/job/template/vertex.rb', line 42

def translate(key, options)
  ::I18n.translate(
    "#{Mongoid::Errors::MongoidError::BASE_KEY}.validations",
    {:errors => Tengine::Job::Template::Vertex.flatten_errors(document).to_a.join(', ')})
end