Skip to content

Commit

Permalink
Give precendence to current user's team in current_team
Browse files Browse the repository at this point in the history
  • Loading branch information
gazayas authored and jagthedrummer committed Aug 31, 2023
1 parent bfabae1 commit 8abce66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bullet_train/app/helpers/account/teams_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8abce66

Please sign in to comment.