Skip to content

Commit f6c0ce5

Browse files
authored
Allow arrays of arrays of errors. (#23)
1 parent f033d89 commit f6c0ce5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/jsonapi/renderer/document.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def data_hash
4545

4646
def errors_hash
4747
{}.tap do |hash|
48-
hash[:errors] = @errors.map(&:as_jsonapi)
48+
hash[:errors] = @errors.flat_map(&:as_jsonapi)
4949
end
5050
end
5151

0 commit comments

Comments
 (0)