diff options
author | Robert Speicher <rspeicher@gmail.com> | 2016-09-21 15:28:26 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-09-21 15:28:26 +0300 |
commit | e2c2bd69f2ccb6b8df41685b48259c4cde91eb8b (patch) | |
tree | 24162e7a777b36ed4d63d9949ebc82e54ed6de4b /app/models/project_team.rb | |
parent | e4485d7b688e24eb9a9db5b2af0b6372892822da (diff) |
Simplify invited_group_members filter-by-level
Diffstat (limited to 'app/models/project_team.rb')
-rw-r--r-- | app/models/project_team.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/models/project_team.rb b/app/models/project_team.rb index 3cb11fee07f..d9ce5088903 100644 --- a/app/models/project_team.rb +++ b/app/models/project_team.rb @@ -244,12 +244,12 @@ class ProjectTeam next if numeric_level > link.group_access # Make sure we include everyone _above_ the requested level as well - if numeric_level == link.group_access - invited_group_members = invited_group_members - .where("access_level >= ?", link.group_access) - else - invited_group_members = invited_group_members.public_send(level) - end + invited_group_members = + if numeric_level == link.group_access + invited_group_members.where("access_level >= ?", link.group_access) + else + invited_group_members.public_send(level) + end end invited_members << invited_group_members |