diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2015-10-13 11:49:01 +0200 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2015-10-15 12:05:01 +0200 |
commit | 1554786c6ac49b452697d2f7a3e8daf6e3ac36d3 (patch) | |
tree | 47393db31476e5c7022350463e74a2cb6deb8ed3 /app/models/group.rb | |
parent | ff8f7fb0a111a5db2a50aa40e967cae699b0b245 (diff) | |
download | gitlab-ce-1554786c6ac49b452697d2f7a3e8daf6e3ac36d3.tar.gz |
Eager load various issue/note associations
This ensures we don't end up running N+1 queries for the objects in the
affected collections.
Diffstat (limited to 'app/models/group.rb')
-rw-r--r-- | app/models/group.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/group.rb b/app/models/group.rb index 9cd146bb73b..465c22d23ac 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -64,7 +64,7 @@ class Group < Namespace end def owners - @owners ||= group_members.owners.map(&:user) + @owners ||= group_members.owners.includes(:user).map(&:user) end def add_users(user_ids, access_level, current_user = nil) |