I am a bit of a newbie to Ember.js and I am having an issue when trying to use the model function within a route.
I have been following the docs on the ember website and so far have the following.
App.Latest = DS.Model.extend({
title: DS.attr('string'),
volume: DS.attr('string'),
issue: DS.attr('string')
});
App.Latest.FIXTURES = [{
"title": "test Title",
"volume": "test volume",
"issue": "test issue",
}];
App.LatestRoute = Ember.Route.extend({
model: function() {
return App.Latest.find();
}
});
This gives me the following in chrome's console
Uncaught TypeError: Cannot read property 'find' of undefined
Thanks
EDIT: I am using ember-1.0.0-rc.3 and I have the adapter set up.
FIX: Make sure your not making school boy errors like me and check your ember data is up to date