Created
December 4, 2014 02:43
-
-
Save shanelau/61cb2fc30d26070b5f48 to your computer and use it in GitHub Desktop.
ember model fixture data
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
import DS from 'ember-data'; | |
var Article = DS.Model.extend({ | |
title: DS.attr(), | |
body: DS.attr(), | |
comments: DS.hasMany('comment',{async:true}) | |
}); | |
Article.reopenClass({ | |
FIXTURES: [ | |
{id: 1, title: 'Bugs', body: 'djskaljklfjdakljfkldsjklf ',comments:[1,3]}, | |
{id: 2, title: 'Wile E.', body: 'Coyotdsajdksaljdklajskdklasjke',comments:[1]} | |
] | |
}); | |
export default Article; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment