From 1c078a7081e83839a7689c9a8c5e4d49b9b75e4c Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 14 Feb 2015 10:12:26 +0000 Subject: [PATCH] Use query with custom select for faster rendering of the project drop-down (#19102). git-svn-id: http://svn.redmine.org/redmine/trunk@14003 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 24d033a7e..74f8ab828 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -327,7 +327,7 @@ module ApplicationHelper # Renders the project quick-jump box def render_project_jump_box return unless User.current.logged? - projects = User.current.memberships.collect(&:project).compact.select(&:active?).uniq + projects = User.current.projects.active.select(:id, :name, :identifier, :lft, :rgt).to_a if projects.any? options = ("" + -- 2.39.5