diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-01-25 17:36:10 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-01-25 17:36:10 +0400 |
commit | 70e05801b196a460ec2b1d6f6f096f44d32b7928 (patch) | |
tree | d77dfc421212d80665c6d404f3d5b9d24e8ff6bb /app | |
parent | 8016a7bd33d6d488a2d180af1d4ac12ef3421e00 (diff) |
fix User.potential_team_members
Diffstat (limited to 'app')
-rw-r--r-- | app/models/user.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 469436e9e3f..8ef8ecda797 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -91,7 +91,7 @@ class User < ActiveRecord::Base scope :alphabetically, order('name ASC') scope :in_team, ->(team){ where(id: team.member_ids) } scope :not_in_team, ->(team){ where('users.id NOT IN (:ids)', ids: team.member_ids) } - scope :potential_team_members, ->(team) { team.members.any? ? active : active.not_in_team(team) } + scope :potential_team_members, ->(team) { team.members.any? ? active.not_in_team(team) : active } # # Class methods |