We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b265419 + 8b8da16 commit 4b7a08fCopy full SHA for 4b7a08f
README.md
@@ -36,6 +36,12 @@ require 'grape-active_model_serializers'
36
class API < Grape::API
37
format :json
38
formatter :json, Grape::Formatter::ActiveModelSerializers
39
+
40
+ # Serializes errors with ActiveModel::Serializer::ErrorSerializer if an ActiveModel.
41
+ # Serializer conforms to the adapter, ex: json, jsonapi.
42
+ # So an error formatted with a jsonapi formatter would render as per:
43
+ # http://jsonapi.org/format/#error-objects
44
+ error_formatter :json, Grape::Formatter::ActiveModelSerializers
45
end
46
```
47
0 commit comments