I'm having some trouble after upgrading to the most recent version of ember-data (1.0 beta 5...I was previously v 14). The error I'm getting is "Error while loading route: TypeError: Cannot set property 'store' of undefined". I'm not setting the store at this point. The error occurs right after the "model" function is called in the route. Any pointers are appreciated.
CallMonitor.ContactPoint = DS.Model.extend({
"status": DS.attr('string'),
"contact": DS.belongsTo('contact')
});
CallMonitor.Contact = DS.Model.extend({
"type": DS.attr('string'),
"status": DS.attr('string'),
"message": DS.attr('string'),
"creator": DS.attr('string'),
"spid": DS.attr('string'),
"added": DS.attr('date'),
"contactPoints": DS.hasMany('contactPoint')
});
CallMonitor.ApplicationAdapter = DS.RESTAdapter.extend({namespace: 'api'});
CallMonitor.ContactsRoute = Ember.Route.extend({
model: function(){
return this.store.find('contact');
},
setupController: function(controller, contacts)
controller.set('contact', contacts);
}
});