summaryrefslogtreecommitdiff
path: root/billing/app/controllers/payments_controller.rb
diff options
context:
space:
mode:
authorjessib <jessib@riseup.net>2013-08-06 14:21:08 -0700
committerjessib <jessib@riseup.net>2013-08-06 14:21:08 -0700
commit6f5e2c2cdcbdb9ea4aca71f0bde2a935d979da3f (patch)
tree501cd66ee60980711983a6860ea00fcaf2dd8639 /billing/app/controllers/payments_controller.rb
parent926ab284677079c8ea02013e8af0647d3a1ce516 (diff)
Some more tweaks to have billing code work, and allow admins to view but not edit for other users.
Diffstat (limited to 'billing/app/controllers/payments_controller.rb')
-rw-r--r--billing/app/controllers/payments_controller.rb3
1 files changed, 2 insertions, 1 deletions
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