summaryrefslogtreecommitdiff
path: root/billing/app/controllers/billing_base_controller.rb
blob: 67dff723c370e8e2a49ac1ccf9e6a959252e2963 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class BillingBaseController < ApplicationController
  before_filter :assign_user

  helper 'billing'

  # required for navigation to work.
  #TODO doesn't work for admins
  def assign_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