I'm working on a basic Ember / Rails app that has a bunch of nested relationships, for example:
class Release < ActiveRecord::Base
has_many :tracks
end
When I hit my Releases endpoint, I'm getting some lovely JSON like this:
{
releases: [{
id: 1,
name: "Release Name",
artist: "Artist Name",
tracks: [{
id: 1,
name: "Track 1",
},
{
id: 2,
name: "Track 2",
}]
}]
}
I've read almost everything I can find on the web about this. How do I map the "Track" model to Ember, so I can display a release with its tracks at the same time?
DS.hasMany? asyc:true? embedded:true? None of this works for me.
Versions:
- Ember: 1.4.0-beta.1+canary.011b67b8
- Ember Data: 1.0.0-beta.5+canary.d9ce2a53
- Handlebars: 1.1.1
- jQuery: 1.10.2