Allow referencing sideloaded include by key. (#2136)

* If a `key` is set on the reflection use the `key` instead of `name`.
This ensures that associations with a key set are still included.
This commit is contained in:
Christian
2017-05-18 13:59:14 -07:00
committed by Benjamin Fleischer
parent a5ab62fd18
commit a89e78c655
3 changed files with 34 additions and 3 deletions

View File

@@ -5,6 +5,7 @@
Breaking changes:
Features:
- [#2136](https://github.com/rails-api/active_model_serializers/pull/2136) Enable inclusion of sideloaded relationship objects by `key`. (@caomania)
- [#2021](https://github.com/rails-api/active_model_serializers/pull/2021) ActiveModelSerializers::Model#attributes. Originally in [#1982](https://github.com/rails-api/active_model_serializers/pull/1982). (@bf4)
- [#2130](https://github.com/rails-api/active_model_serializers/pull/2130) Allow serialized ID to be overwritten for belongs-to relationships. (@greysteil)