I have as many others upgraded my ember app to the newest version of anything, but after having upgraded, my app is still not working.
I have simplified a lot, and it boils down to my route. My route is like this (as suggested in the transition guide):
App.BoxesRoute = Ember.Route.extend({
model: function(){
return this.store.find('box');
}
});
Extremely simple and nothing should be wrong, right? My model looks like this:
App.Box = DS.Model.extend({
enabled: DS.attr('boolean'),
updatedAt: DS.attr('date'),
boxMeters: DS.hasMany('App.BoxMeter')
});
The App.BoxMeter is very similar, but they key thing is that all of this worked before I upgraded to 1.0.0.
I get a couple of errors thrown in my face. They are:
Assertion failed: No model was found for 'App.Box' ember.js?body=1:394
Error while loading route: TypeError {} ember.js?body=1:394
Uncaught TypeError: Cannot set property 'store' of undefined
none of which makes any sense for me. I have looked over the routes and models countless times, and this is just .. weird! How should I tackle this?
Try replacing this line:
boxMeters: DS.hasMany('App.BoxMeter')
with:
boxMeters: DS.hasMany('boxMeter')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With