From 394e9ce11b29302d326d84f42b6539e9879e5024 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Fri, 8 May 2015 14:44:36 +0200 Subject: [PATCH] Change account to Controller --- app/controllers/account.coffee | 6 +++--- app/controllers/profile.coffee | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/account.coffee b/app/controllers/account.coffee index f060c8da..c08ed3ce 100644 --- a/app/controllers/account.coffee +++ b/app/controllers/account.coffee @@ -1,6 +1,6 @@ `import Ember from 'ember'` -Controller = Ember.ObjectController.extend +Controller = Ember.Controller.extend allHooks: [] needs: ['currentUser'] userBinding: 'controllers.currentUser' @@ -21,7 +21,7 @@ Controller = Ember.ObjectController.extend hook.toggle() reloadHooks: -> - if login = @get('login') + if login = @get('model.login') hooks = @store.find('hook', all: true, owner_name: login) hooks.then () -> @@ -49,7 +49,7 @@ Controller = Ember.ObjectController.extend billingUrl: (-> id = if @get('model.type') == 'user' then 'user' else @get('model.login') - "#{@get('config').billingEndpoint}/subscriptions/#{id}" + "#{@config.billingEndpoint}/subscriptions/#{id}" ).property('model.login', 'model.type') `export default Controller` diff --git a/app/controllers/profile.coffee b/app/controllers/profile.coffee index 4686516a..742fb083 100644 --- a/app/controllers/profile.coffee +++ b/app/controllers/profile.coffee @@ -5,7 +5,7 @@ Controller = Ember.Controller.extend needs: ['currentUser', 'accounts', 'account'] userBinding: 'controllers.currentUser' - accountBinding: 'controllers.account' + accountBinding: 'controllers.account.model' activate: (action, params) -> this["view_#{action}".camelize()]()