rails-api/active_model_serializers — pull request #198 by jredburn (2013-01-28 14:45:55+00:00)
Title: 'embed_key' option to allow embedding by attributes other than IDs

In our application, we often expose external IDs rather than the internal database IDs to the consumers of our JSON API. In order to support this and take advantage of the embedding functionality, I've added an 'embed_key' option to the associations to allow specification of a non-ID attribute.