From a98752629c8d04a5fde2287a924855de63321bb2 Mon Sep 17 00:00:00 2001 From: jessib Date: Thu, 1 Aug 2013 12:18:03 -0700 Subject: Start to functionality for admins viewing billing of other users. --- billing/app/controllers/billing_base_controller.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'billing/app/controllers/billing_base_controller.rb') diff --git a/billing/app/controllers/billing_base_controller.rb b/billing/app/controllers/billing_base_controller.rb index dc15194..67dff72 100644 --- a/billing/app/controllers/billing_base_controller.rb +++ b/billing/app/controllers/billing_base_controller.rb @@ -4,8 +4,13 @@ class BillingBaseController < ApplicationController helper 'billing' # required for navigation to work. + #TODO doesn't work for admins def assign_user - @user = current_user + if params[:id] + @user = User.find_by_param(params[:id]) + else + @user = current_user #TODO not always correct for admins viewing another user! + end end end -- cgit v1.2.3