lib/jsonapionify/structure/helpers/errors.rb in jsonapionify-0.0.1.pre vs lib/jsonapionify/structure/helpers/errors.rb in jsonapionify-0.9.0
- old
+ new
@@ -46,10 +46,10 @@
each_with_object(Collections::Errors.new) do |(pointer, messages), collection|
*, key = pointer.to_s.split('/')
entity = key.present? ? key : 'object'
messages.each do |message|
message = "#{entity} #{message}".chomp('.') << '.'
- object = {
+ object = {
source: {
pointer: pointer
},
detail: message,
status: "422"