This styleguide aims to suggest some style conventions to follow while writing your application.
Note: evaluate each suggestion and consider where it's right fit for you.
Fat arrow automatically maintains a reference to the context when using this
in a closure.
export default Ember.Route.extend({
afterModel(model) {
return this.get('ajax').request('verify', model)
.catch((error) => {
// this refers to the Route instance
this.transtionTo('verification-failed', error);
});
}
});