From 2829e7020abcf6d2f708fbc7dfb3db98ad174255 Mon Sep 17 00:00:00 2001 From: jessib Date: Mon, 15 Apr 2013 12:13:33 -0700 Subject: Displaying of user's subscription. Still not committed to whether user can have multiple subscriptions at a time or not. --- billing/app/controllers/customer_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'billing/app/controllers/customer_controller.rb') diff --git a/billing/app/controllers/customer_controller.rb b/billing/app/controllers/customer_controller.rb index a16e3fe..4192f4c 100644 --- a/billing/app/controllers/customer_controller.rb +++ b/billing/app/controllers/customer_controller.rb @@ -19,7 +19,7 @@ class CustomerController < BillingBaseController @tr_data = Braintree::TransparentRedirect. update_customer_data(:redirect_url => confirm_customer_url, :customer_id => params[:id]) - @subscriptions = @braintree_data.credit_cards.map(&:subscriptions).flatten + @subscriptions = customer.active_subscriptions(@braintree_data) else # TODO: will want to have case for admins, presumably access_denied -- cgit v1.2.3