aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 4e71ff8..14f50bf 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -7,8 +7,10 @@ class ApplicationController < ActionController::Base
protected
+ include ApplicationHelper
+
def current_agent
- @current_agent = session[:current_agent] || current_user.presence&.agents&.first&.name || 'IN COMMON'
+ @current_agent = Agent.find_by(name: session[:current_agent] || current_user.presence&.agents&.first&.name || 'incommon')
end
helper_method :current_agent