kurko/ember-json-api — pull request #50 by Asgaroth (2014-10-31 03:12:16+00:00)
Title: Adding type to  when necessary

Adds a type to the `links` key when the relationship name is different than the related object:

```
// Given:
Post = DS.Model.extend({
comments: DS.hasMany('comment')
});

{
"id": "1",
"links": {
"comments": [ "5", "12", "17", "20" ]
}
}
```

Now when the name of the realtionship is different to the related type

```
// Given:
Post = DS.Model.extend({
observations: DS.hasMany('comment')
});

{
"id": "1",
"links": {
"observations": {
ids: [ "5", "12", "17", "20" ],
type: "comment"
}
}
}
```