From df412551058c0ca442346e4671ef2ae4c6a9a857 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 4 Jul 2012 17:34:37 +0000 Subject: [PATCH] Perf: don't load parent message for generating a link. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9904 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 7772035d3..eaf89da8a 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -128,7 +128,7 @@ module ApplicationHelper h(truncate(message.subject, :length => 60)), { :controller => 'messages', :action => 'show', :board_id => message.board_id, - :id => message.root, + :id => (message.parent_id || message.id), :r => (message.parent_id && message.id), :anchor => (message.parent_id ? "message-#{message.id}" : nil) }.merge(options), -- 2.39.5