Change account to Controller
This commit is contained in:
parent
8b333c09fa
commit
394e9ce11b
|
@ -1,6 +1,6 @@
|
||||||
`import Ember from 'ember'`
|
`import Ember from 'ember'`
|
||||||
|
|
||||||
Controller = Ember.ObjectController.extend
|
Controller = Ember.Controller.extend
|
||||||
allHooks: []
|
allHooks: []
|
||||||
needs: ['currentUser']
|
needs: ['currentUser']
|
||||||
userBinding: 'controllers.currentUser'
|
userBinding: 'controllers.currentUser'
|
||||||
|
@ -21,7 +21,7 @@ Controller = Ember.ObjectController.extend
|
||||||
hook.toggle()
|
hook.toggle()
|
||||||
|
|
||||||
reloadHooks: ->
|
reloadHooks: ->
|
||||||
if login = @get('login')
|
if login = @get('model.login')
|
||||||
hooks = @store.find('hook', all: true, owner_name: login)
|
hooks = @store.find('hook', all: true, owner_name: login)
|
||||||
|
|
||||||
hooks.then () ->
|
hooks.then () ->
|
||||||
|
@ -49,7 +49,7 @@ Controller = Ember.ObjectController.extend
|
||||||
|
|
||||||
billingUrl: (->
|
billingUrl: (->
|
||||||
id = if @get('model.type') == 'user' then 'user' else @get('model.login')
|
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')
|
).property('model.login', 'model.type')
|
||||||
|
|
||||||
`export default Controller`
|
`export default Controller`
|
||||||
|
|
|
@ -5,7 +5,7 @@ Controller = Ember.Controller.extend
|
||||||
|
|
||||||
needs: ['currentUser', 'accounts', 'account']
|
needs: ['currentUser', 'accounts', 'account']
|
||||||
userBinding: 'controllers.currentUser'
|
userBinding: 'controllers.currentUser'
|
||||||
accountBinding: 'controllers.account'
|
accountBinding: 'controllers.account.model'
|
||||||
|
|
||||||
activate: (action, params) ->
|
activate: (action, params) ->
|
||||||
this["view_#{action}".camelize()]()
|
this["view_#{action}".camelize()]()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user