BigW Consortium Gitlab

Commit 38efe1bf by Rémy Coutable

Get rid of second N+1 query problem

Signed-off-by: 's avatarRémy Coutable <remy@rymai.me>
parent 8e388fca
...@@ -21,6 +21,10 @@ module Banzai ...@@ -21,6 +21,10 @@ module Banzai
only_path: context[:only_path]) only_path: context[:only_path])
end end
def project_from_ref(ref)
projects_per_reference[ref || current_project_path]
end
# Returns a Hash containing the merge_requests per Project instance. # Returns a Hash containing the merge_requests per Project instance.
def merge_requests_per_project def merge_requests_per_project
@merge_requests_per_project ||= begin @merge_requests_per_project ||= begin
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment