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.
1 parent b265419 commit 8b8da16Copy full SHA for 8b8da16
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