I'm using Ember-Rails to build an Ember front-end app with a Rails API for a beckend. I've been working on implementing authentication, and I arrived at the following error:
Cannot read property 'extend' of undefined
when trying to extend a route as follows:
App.AdminRoute = App.AuthenticateRoute.extend({
model: function(params) {
return this.store.find('user', params.id);
},
});
And I had an AuthenticateRoute defined as follows:
App.AuthenticateRoute = Ember.Route.extend({
//yada yada
});
I was more-or-less following a guide found on: http://www.embercasts.com/episodes/client-side-authentication-part-2
I am not sure why this is not working, but I noticed my AuthenticateRoute could be extended from other routes, which I find extremely strange.