pixelhandler/ember-data-extensions — pull request #6 by pixelhandler (2014-01-26 01:41:48+00:00)
Title: Serialize w/ embedded objects, hasMany relationships including related objects (not embedded)

To embed the ids for a related object (using a hasMany relationship):

App.PostSerializer = DS.RESTSerializer.extend(DS.EmbeddedMixin, {
attrs: {
comments: {embedded: 'ids'}
}
})

{
"post": {
"id": "1"
"title": "Rails is omakase",
"body": "I want this for my ORM, I want that for my template language..."
"comments": ["1", "2"]
}
}