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