From 54cd5079a8609b1d036f991a26248bbcfc0008c5 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Fri, 27 Mar 2015 15:28:59 +0100 Subject: [PATCH] Plug billingUrl properly --- app/controllers/account.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/controllers/account.coffee b/app/controllers/account.coffee index c4c5af45..f060c8da 100644 --- a/app/controllers/account.coffee +++ b/app/controllers/account.coffee @@ -47,4 +47,9 @@ Controller = Ember.ObjectController.extend @config.show_repos_hint == 'public' ) .property() + billingUrl: (-> + id = if @get('model.type') == 'user' then 'user' else @get('model.login') + "#{@get('config').billingEndpoint}/subscriptions/#{id}" + ).property('model.login', 'model.type') + `export default Controller`