summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-14 19:22:09 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-14 19:22:09 +0000
commitf607a7a023774362979ca5113a48e1138566b3bb (patch)
tree81b799576c0f0bdc05cd0875fd6ccc18b68b30b0 /app
parentb41b738aa40097f3610abe3038646c98f6739783 (diff)
downloadredmine-f607a7a023774362979ca5113a48e1138566b3bb.tar.gz
redmine-f607a7a023774362979ca5113a48e1138566b3bb.zip
Use route helper in #link_to_message.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11186 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/helpers/application_helper.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 8457b20fb..4825615a1 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -120,13 +120,11 @@ module ApplicationHelper
# Generates a link to a message
def link_to_message(message, options={}, html_options = nil)
link_to(
- h(truncate(message.subject, :length => 60)),
- { :controller => 'messages', :action => 'show',
- :board_id => message.board_id,
- :id => (message.parent_id || message.id),
+ truncate(message.subject, :length => 60),
+ board_message_path(message.board_id, message.parent_id || message.id, {
:r => (message.parent_id && message.id),
:anchor => (message.parent_id ? "message-#{message.id}" : nil)
- }.merge(options),
+ }.merge(options)),
html_options
)
end