Skip to content

Commit

Permalink
fixed: showing duplicate teams under user profile
Browse files Browse the repository at this point in the history
  • Loading branch information
Navinnair committed May 26, 2019
1 parent b7126b7 commit 53994c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class User < ActiveRecord::Base
has_many :project_managers
has_many :projects, :through => :project_managers
has_many :team_members
has_many :teams, :through => :team_members
has_many :teams, -> { uniq }, :through => :team_members
has_many :admin_teams, :through => :projects, :source => :teams
has_many :leads, -> { where role: 'lead' }, class_name: 'TeamMember'
has_many :admin_teams, :through => :leads, :source => :team #,:foreign_key=>'user_id'
Expand Down

0 comments on commit 53994c2

Please sign in to comment.