summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-02-14 10:12:26 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-02-14 10:12:26 +0000
commit1c078a7081e83839a7689c9a8c5e4d49b9b75e4c (patch)
treeac9abde738c34ba572d4854302c3ff2571da707c /app/helpers
parent36426260527d24f502fd322b4b3173f0ac1a2cc5 (diff)
downloadredmine-1c078a7081e83839a7689c9a8c5e4d49b9b75e4c.tar.gz
redmine-1c078a7081e83839a7689c9a8c5e4d49b9b75e4c.zip
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
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_helper.rb2
1 files changed, 1 insertions, 1 deletions
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 =
("<option value=''>#{ l(:label_jump_to_a_project) }</option>" +