Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@bakura10
Created February 23, 2014 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bakura10/9172301 to your computer and use it in GitHub Desktop.
Save bakura10/9172301 to your computer and use it in GitHub Desktop.
module.exports = App.ApplicationRoute = Ember.Route.extend(Ember.SimpleAuth.ApplicationRouteMixin, {
/**
* Setup the application controller
*
* @param controller
*/
setupController: function(controller) {
var projects = this.get('session.user.projects');
if (projects.get('length') > 0) {
controller.set('activeProject', projects.get('firstObject'));
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment