Context switching for client

This commit is contained in:
Martin Lensment 2014-09-26 17:32:57 +03:00
parent 5dfee40b87
commit b48b91878d
9 changed files with 44 additions and 12 deletions

View file

@ -1,3 +1,8 @@
class ClientController < ApplicationController
helper_method :current_registrar
def current_registrar
return Registrar.find(session[:current_user_registrar_id]) if current_user.admin?
current_user.registrar
end
end