Skip to content

Commit 44ff13e

Browse files
author
Sebastian Wilgosz
committed
Fix nested table issue for validation errors
Validation errors are called with an array of error details The serializer returned [[]] in that case
1 parent 8ef48ae commit 44ff13e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/jsonapi_errors_handler/error_serializer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def to_json(_payload = nil)
2020

2121
def serializable_hash
2222
{
23-
errors: [error.serializable_hash]
23+
errors: [error.serializable_hash].flatten
2424
}
2525
end
2626

0 commit comments

Comments
 (0)