Q:

Ember.js - Is there a convenient way to include a Mixin in every Route?

I'd like to do something like this:
  App.EveryRouteMixin = Ember.Mixin.create({
    enter: function() {
      /* do something */
      this._super();
    }
  });

Is that possible?  I'm using Ember 1.0.0 RC3

A:

The most convenient would be to modify Ember.Route, like:
Ember.Route.
In general it's best to avoid modifying built-in ember classes like that. An alternative is to use application-specific base classes. Use these base classes when defining objects so that there is a good place to make global changes. So something like:
App.Route = Ember.Route.extend({});

App.Route.reopen({
  enter: function() {
    console.log('App.Route.enter()', this.toString());
    return this._super();
  }
});

App.IndexRoute = App.Route.extend({
  //Index route code here
}) 

App.PostsRoute = App.Route.extend({
  //Post route code here
}) 

