Commit 38efe1bf authored by Rémy Coutable's avatar Rémy Coutable

Get rid of second N+1 query problem

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 8e388fca
......@@ -21,6 +21,10 @@ module Banzai
only_path: context[:only_path])
end
def project_from_ref(ref)
projects_per_reference[ref || current_project_path]
end
# Returns a Hash containing the merge_requests per Project instance.
def merge_requests_per_project
@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