Looking for guidance on creating an authenticated route, I came across this example: https://gist.github.com/machty/5647589
When attempting to execute the following code:
App.AuthenticatedRoute = Ember.Route.extend({
beforeModel: function(transition) {
if (!authTokenPresent) {
return RSVP.reject();
}
}
}
I encountered the error:
Uncaught ReferenceError: RSVP is not defined
Having limited experience with promises, I assumed that RSVP was a built-in feature of Ember for rejecting a promise. Is there a different approach I should take in this situation?