diff options
author | Reuben Pereira <reuben453@gmail.com> | 2018-07-03 21:26:28 +0530 |
---|---|---|
committer | Reuben Pereira <reuben453@gmail.com> | 2018-07-03 21:26:28 +0530 |
commit | 7429eb3b48515d05d3840b6ba8ca68581eeb5ebe (patch) | |
tree | b5195e634b8b9d94228b2adefb781be2ef091528 /lib | |
parent | 6572e045acbf43139dfecfe0ed1b289dfa12b6fa (diff) | |
download | gitlab-ce-7429eb3b48515d05d3840b6ba8ca68581eeb5ebe.tar.gz |
Eager load a project's route and its namespace with route in project_reference_filter
Diffstat (limited to 'lib')
-rw-r--r-- | lib/banzai/filter/project_reference_filter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/banzai/filter/project_reference_filter.rb b/lib/banzai/filter/project_reference_filter.rb index 6eead2ab1c3..9e680d25b50 100644 --- a/lib/banzai/filter/project_reference_filter.rb +++ b/lib/banzai/filter/project_reference_filter.rb @@ -70,7 +70,7 @@ module Banzai # The keys of this Hash are the project paths, the values the # corresponding Project objects. def projects_hash - @projects ||= Project.eager_load(:namespace, :route) + @projects ||= Project.eager_load(:route, namespace: [:route]) .where_full_path_in(projects) .index_by(&:full_path) .transform_keys(&:downcase) |