Module: DataMapper::Serializer::ValidationErrors::ToJson

Included in:
Validations::ValidationErrors
Defined in:
lib/dm-serializer/to_json.rb

Instance Method Summary collapse

Instance Method Details

#to_json(*args) ⇒ Object



71
72
73
# File 'lib/dm-serializer/to_json.rb', line 71

def to_json(*args)
  MultiJson.encode(Hash[ errors ])
end