Skip to content
Snippets Groups Projects
Commit c9913ddb authored by Ahmad Sherif's avatar Ahmad Sherif
Browse files

Use select(:foo) instead of map(&:foo) in GlobalMilestone

Former-commit-id: 2161c72d
parent a971c4dd
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment