Skip to content

Instantly share code, notes, and snippets.

@fespinoza
Created April 24, 2013 17:47
Show Gist options
  • Select an option

  • Save fespinoza/5454062 to your computer and use it in GitHub Desktop.

Select an option

Save fespinoza/5454062 to your computer and use it in GitHub Desktop.
My model and its association
App.SocialNetwork = DS.Model.extend({
name: DS.attr('string'),
actors: DS.hasMany('App.Actor')
});
App.Actor = DS.Model.extend({
name: DS.attr('string'),
x: DS.attr('number'),
y: DS.attr('number'),
social_network: DS.belongsTo('App.SocialNetwork'),
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment