From 8abce663cb064ed1703a998213961a79af1af465 Mon Sep 17 00:00:00 2001 From: Gabriel Zayas Date: Wed, 19 Apr 2023 14:06:04 +0900 Subject: [PATCH] Give precendence to current user's team in current_team --- bullet_train/app/helpers/account/teams_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bullet_train/app/helpers/account/teams_helper.rb b/bullet_train/app/helpers/account/teams_helper.rb index bd3528842..8b10c6a89 100644 --- a/bullet_train/app/helpers/account/teams_helper.rb +++ b/bullet_train/app/helpers/account/teams_helper.rb @@ -2,7 +2,7 @@ module Account::TeamsHelper def current_team # TODO We do not want this to be based on the `current_team_id`. # TODO We want this to be based on the current resource being loaded. - @team || current_user&.current_team + current_user&.current_team || @team end def other_teams