emberjs/data — pull request #1637 by pixelhandler (2014-01-09 07:55:39+00:00)
Title: AMS has_one embedded objects support using belongsTo relationship

See [proposal on discuss.emberjs.com][0] and [PR #1516][1], [#1633][2]

DS.EmbeddedRecordsMixin handles embedded hasMany relationships, but not embedded belongsTo relationships.

This PR adds in the missing support for embedded objects in a payload that should be extracted/serialized for records with a belongsTo relationship.

- ActiveModel::Serializers can embed objects in a JSON payload using `has_one :xxxx, embed: :objects`
- DS.ActiveModelSerializer only supports embedded hasMany objects and is missing support for embedded belongsTo objects.
- Supports multiply-nested belongsTo objects as proposed in [#1633][2]

[0]:
http://discuss.emberjs.com/t/extend-ds-activemodelserializer-support-for-embedded-objects-belongsto-relationship-using-has-one
[1]: https://github.com/emberjs/data/pull/1516
[2]: https://github.com/emberjs/data/pull/1633