Commit 972f1221 authored by Reuben Pereira's avatar Reuben Pereira

Eager load the namespace and route of a project in project_reference_filter.rb

parent c8302b2f
......@@ -70,7 +70,8 @@ module Banzai
# The keys of this Hash are the project paths, the values the
# corresponding Project objects.
def projects_hash
@projects ||= Project.where_full_path_in(projects)
@projects ||= Project.eager_load(:namespace, :route)
.where_full_path_in(projects)
.index_by(&:full_path)
.transform_keys(&:downcase)
end
......
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