Skip to content

Instantly share code, notes, and snippets.

@raytiley
Created April 24, 2013 18:16
Show Gist options
  • Save raytiley/5454261 to your computer and use it in GitHub Desktop.
Save raytiley/5454261 to your computer and use it in GitHub Desktop.
relationship not working
App.Show = DS.Model.extend({
title: DS.attr('string'),
airing: DS.hasMany('App.Airing')
});
App.Airing = DS.Model.extend({
channel: DS.attr('number'),
show: DS.belongsTo('App.Show')
});
<script type="text/handlebars">
{{#each airing in controller}}
<tr>
<td>{{airing.show.id}}</td>
<td>{{airing.show.title}}</td>
</tr>
{{/each}}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment