From 6f5e2c2cdcbdb9ea4aca71f0bde2a935d979da3f Mon Sep 17 00:00:00 2001 From: jessib Date: Tue, 6 Aug 2013 14:21:08 -0700 Subject: Some more tweaks to have billing code work, and allow admins to view but not edit for other users. --- billing/app/controllers/payments_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'billing/app/controllers/payments_controller.rb') diff --git a/billing/app/controllers/payments_controller.rb b/billing/app/controllers/payments_controller.rb index 224b78e..3ffc5a3 100644 --- a/billing/app/controllers/payments_controller.rb +++ b/billing/app/controllers/payments_controller.rb @@ -16,9 +16,10 @@ class PaymentsController < BillingBaseController end def index - customer = Customer.find_by_user_id(current_user.id) + customer = Customer.find_by_user_id(@user.id) braintree_data = Braintree::Customer.find(customer.braintree_customer_id) # these will be ordered by created_at descending, per http://stackoverflow.com/questions/16425475/ + # TODO permissions @transactions = braintree_data.transactions end -- cgit v1.2.3