Commit 9516b031 authored by jplang's avatar jplang

Use route helper in #link_to_message.

git-svn-id: https://svn.redmine.org/redmine/trunk@11186 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 2ac43829
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment