Skip to content

Instantly share code, notes, and snippets.

@joachimhs
Created September 28, 2014 19:40
Show Gist options
  • Save joachimhs/473060d7fd90f8bb1ad6 to your computer and use it in GitHub Desktop.
Save joachimhs/473060d7fd90f8bb1ad6 to your computer and use it in GitHub Desktop.
JSON Payload:
{
"raspberryPis": [
{
"id": "piHome",
"name": "piHome",
"category": "raspberryPis",
"content": null,
"projects": [
"projects_testProject"
],
"installedVersion": "0.1.0",
"online": true
}
]
}
Model:
Piaas.RaspberryPi = DS.Model.extend({
projects: DS.hasMany('project', {async: true}),
installedVersion: DS.attr('string'),
online: DS.attr('boolean')
});
Piaas.Project = DS.Model.extend({
content: DS.attr('string')
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment