Skip to content

Instantly share code, notes, and snippets.

@dadamssg
Last active December 26, 2015 13:19
Show Gist options
  • Save dadamssg/7157107 to your computer and use it in GitHub Desktop.
Save dadamssg/7157107 to your computer and use it in GitHub Desktop.
App.Person = DS.Model.extend({
id: DS.attr('number'),
name: DS.attr('string'),
city: DS.attr('string'),
company: DS.belongsTo('company')
});
App.Person.FIXTURES = [
{
id: 1,
name: 'David Adams',
city: 'Euless'
},
{
id: 2,
name: 'John Doe',
city: 'Dallas'
},
{
id: 3,
name: 'Bob Smith',
city: 'Austin'
}
];
App.Company = DS.Model.extend({
id: DS.attr('number'),
name: DS.attr('string'),
people: DS.hasMany('person')
});
App.Company.FIXTURES = [
{
id: 1,
name: 'Adams Inc',
},
{
id: 2,
name: 'Bull Industries',
},
{
id: 3,
name: 'Cowen Corp.',
}
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment