Skip to content

Instantly share code, notes, and snippets.

@kylemellander
Last active July 17, 2016 23:19
Show Gist options
  • Save kylemellander/273c30b31a649c1ed5c9f4089a367f7d to your computer and use it in GitHub Desktop.
Save kylemellander/273c30b31a649c1ed5c9f4089a367f7d to your computer and use it in GitHub Desktop.
// payload
{
"data": {
"id": 1,
"type": "user",
"attributes": {
"name": "Tomster",
"favorite-food-id": 31
}
}
// Model
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
export default Model.extend({
name: attr('string'),
favoriteFoodId: attr('number')
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment