diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-10 14:40:26 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-14 12:05:50 +0200 |
commit | e6569defe61f114beb051a1ebf8186f03eed1f5c (patch) | |
tree | 5b1aaa42ac6dfd43367a1653ff97ab9b6df1aff4 /lib/api | |
parent | ff3caad4caf46049c8f202849a05fb15a2aaccb8 (diff) | |
download | gitlab-ce-e6569defe61f114beb051a1ebf8186f03eed1f5c.tar.gz |
Use through-relation instead of manually mapping.
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/group_members.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/api/group_members.rb b/lib/api/group_members.rb index ab5b2d6d9a7..3a3987ab36e 100644 --- a/lib/api/group_members.rb +++ b/lib/api/group_members.rb @@ -9,8 +9,7 @@ module API # GET /groups/:id/members get ":id/members" do group = find_group(params[:id]) - members = group.group_members - users = (paginate members).collect(&:user) + users = group.users present users, with: Entities::GroupMember, group: group end |