mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Add default_includes configuration
This is useful to set application-wide default behavior - e.g. in previous versions of AMS the default behavior was to serialize the full object graph by default - equivalent to the '**' include tree. Currently just the global setting, but I think this could also work on a per-serializer basis, with more attention.
This commit is contained in:
@@ -52,10 +52,12 @@ Each adapter has a default key transform configured:
|
||||
`config.key_transform` is a global override of the adapter default. Adapters
|
||||
still prefer the render option `:key_transform` over this setting.
|
||||
|
||||
##### default_includes
|
||||
What relationships to serialize by default. Default: `'*'`, which includes one level of related
|
||||
objects. See [includes](adapters.md#included) for more info.
|
||||
|
||||
## JSON API
|
||||
|
||||
|
||||
##### jsonapi_resource_type
|
||||
|
||||
Sets whether the [type](http://jsonapi.org/format/#document-resource-identifier-objects)
|
||||
|
||||
Reference in New Issue
Block a user