rails-api/active_model_serializers — pull request #169 by dgeb (2012-12-09 19:33:44+00:00)
Title: Update foreign key naming conventions - fixes #158

This pull request addresses the issues raised by @tchak in #158:

* It appends an `_id` (or `_ids`) suffix to associations' keys when embedding ids. This brings AMS more in line with API conventions and the expectations of Ember Data. The name of the key can still be overridden with the `key` option.

* When objects are embedded in the root, they are now named according to their serializer, instead of the key used for their associations. This can still be overridden with the `root` option.

Note: This PR will bring Ember Data closer to working out-of-the-box with AMS. However, Ember Data will still need to be updated to recognize the `_ids` suffix for `HasMany` associations.