Last active
August 29, 2015 14:02
-
-
Save joshsmith/f395082056b618d6a660 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Recipe = DS.Model.extend | |
title: DS.attr('string') | |
steps: DS.hasMany('step', {async: true}) | |
Step = DS.Model.extend | |
substeps: DS.hasMany('substep', {async: true}) | |
Substep = DS.Model.extend() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"steps": [ | |
{ | |
"id": 1, | |
"substep_ids": [ | |
1, | |
2 | |
] | |
} | |
], | |
"substeps": [ | |
{ | |
"id": 1 | |
}, | |
{ | |
"id": 2 | |
} | |
], | |
"recipes": [ | |
{ | |
"id": 1, | |
"title": "Scrambled Eggs", | |
"step_ids": [ | |
1 | |
] | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"recipes": [ | |
{ | |
"id":1, | |
"title":"Scrambled Eggs" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment