emberjs/ember.js — pull request #2203 by rlivsey (2013-03-03 15:48:24+00:00)
Title: Route events don't need to be in events object and can be inherited

WIP - probably needs some more tests and documentation once we're happy with the concept & implementation.

100% backwards compatible with existing events object so won't break anyones app, just gives new inheritable & composable goodness.

App.MyRoute = Ember.Route.extend({
events: {
someEvent: function(context) {
// oh noes, can't call this._super() :o(
}
}
});

Is now:

App.MyRoute = Ember.Route.extend({
someEvent: function(context) {
// can call this._super()
}.event()
});