diff options
author | Ahmad Sherif <me@ahmadsherif.com> | 2016-09-23 13:35:11 +0200 |
---|---|---|
committer | Ahmad Sherif <me@ahmadsherif.com> | 2016-09-23 13:35:11 +0200 |
commit | 2161c72da01f919aef008c3eb997981374ca1977 (patch) | |
tree | 38d02e9324b28780e0400350f360b510b2983095 /app/models/global_milestone.rb | |
parent | b5132118cd43a3e005f0ed159d4a1be34b9a6ce6 (diff) | |
download | gitlab-ce-2161c72da01f919aef008c3eb997981374ca1977.tar.gz |
Use select(:foo) instead of map(&:foo) in GlobalMilestone
Diffstat (limited to 'app/models/global_milestone.rb')
-rw-r--r-- | app/models/global_milestone.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/global_milestone.rb b/app/models/global_milestone.rb index 3e10bed19c2..bda2b5c5d5d 100644 --- a/app/models/global_milestone.rb +++ b/app/models/global_milestone.rb @@ -32,7 +32,7 @@ class GlobalMilestone end def projects - @projects ||= Project.for_milestones(milestones.map(&:id)) + @projects ||= Project.for_milestones(milestones.select(:id)) end def state @@ -54,11 +54,11 @@ class GlobalMilestone end def issues - @issues ||= Issue.of_milestones(milestones.map(&:id)).includes(:project, :assignee, :labels) + @issues ||= Issue.of_milestones(milestones.select(:id)).includes(:project, :assignee, :labels) end def merge_requests - @merge_requests ||= MergeRequest.of_milestones(milestones.map(&:id)).includes(:target_project, :assignee, :labels) + @merge_requests ||= MergeRequest.of_milestones(milestones.select(:id)).includes(:target_project, :assignee, :labels) end def participants |