diff --git a/assets/scripts/app/controllers/account.coffee b/assets/scripts/app/controllers/account.coffee index d8cc6838..36fe2bae 100644 --- a/assets/scripts/app/controllers/account.coffee +++ b/assets/scripts/app/controllers/account.coffee @@ -1,5 +1,7 @@ Travis.AccountController = Ember.ObjectController.extend allHooks: [] + needs: ['currentUser'] + userBinding: 'controllers.currentUser' init: -> @_super.apply this, arguments @@ -33,3 +35,8 @@ Travis.AccountController = Ember.ObjectController.extend showPublicReposHint: (-> Travis.config.show_repos_hint == 'public' ) .property() + + actions: + sync: -> + @get('user').sync() + diff --git a/assets/scripts/app/controllers/profile.coffee b/assets/scripts/app/controllers/profile.coffee index 65a52dce..a2498206 100644 --- a/assets/scripts/app/controllers/profile.coffee +++ b/assets/scripts/app/controllers/profile.coffee @@ -5,9 +5,6 @@ Travis.ProfileController = Travis.Controller.extend userBinding: 'controllers.currentUser' accountBinding: 'controllers.account' - sync: -> - @get('user').sync() - activate: (action, params) -> this["view#{$.camelize(action)}"]()