Created
April 24, 2013 18:16
-
-
Save raytiley/5454261 to your computer and use it in GitHub Desktop.
relationship not working
This file contains hidden or 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
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