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:
Ben Woosley
2016-01-12 12:05:11 -08:00
committed by Noah Silas
parent a701777bd5
commit 8c18d18cdb
7 changed files with 132 additions and 38 deletions

View File

@@ -5,6 +5,7 @@
Breaking changes:
Features:
- [#1426](https://github.com/rails-api/active_model_serializers/pull/1426) Add ActiveModelSerializers.config.default_includes (@empact)
Fixes:
- [#1710](https://github.com/rails-api/active_model_serializers/pull/1710) Prevent association loading when `include_data` option