Skip to content
Snippets Groups Projects
Commit f522f981 authored by Yorick Peterse's avatar Yorick Peterse Committed by Rubén Dávila
Browse files

Memoize IssuableFinder#projects

Since this method's returned data doesn't change between calls on the
same IssuableFinder instance we can just memoize this similar to the
"project" method.
parent 01bc01af
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -77,11 +77,11 @@ class IssuableFinder
return @projects if defined?(@projects)
 
if project?
project
@projects = project
elsif current_user && params[:authorized_only].presence && !current_user_related?
current_user.authorized_projects
@projects = current_user.authorized_projects
else
ProjectsFinder.new.execute(current_user)
@projects = ProjectsFinder.new.execute(current_user)
end
end
 
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