Sha256: 23fb40106d6365650cf1257f113b261e925f9f830e4b2a922c9d33431b977988
Contents?: true
Size: 480 Bytes
Versions: 8
Compression:
Stored size: 480 Bytes
Contents
module ApiPack module Errors class ValidationErrorSerializer def initialize(record, field, message) @record = record @field = field @message = message end def serialize { resource: underscored_resource_name, field: @field, detail: @message } end private def underscored_resource_name @record.class.to_s.gsub('::', '').underscore end end end end
Version data entries
8 entries across 8 versions & 1 rubygems