Simplify invited_group_members filter-by-level

This commit is contained in:
Robert Speicher 2016-09-21 15:28:26 +03:00
parent e4485d7b68
commit e2c2bd69f2

View file

@ -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