From d1d877d9c3ab1359be49893cecb3f324e1e3272a Mon Sep 17 00:00:00 2001 From: Hagen Schink Date: Fri, 13 Dec 2013 11:28:04 +0100 Subject: [PATCH] Fixes message url --- app/models/activity/message_activity_provider.rb | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/app/models/activity/message_activity_provider.rb b/app/models/activity/message_activity_provider.rb index 67c4e07e39..0f60010ce5 100644 --- a/app/models/activity/message_activity_provider.rb +++ b/app/models/activity/message_activity_provider.rb @@ -66,11 +66,11 @@ class Activity::MessageActivityProvider < Activity::BaseActivityProvider end def event_path(event, activity) - Rails.application.routes.url_helpers.topic_path(url_helper_parameter(event)) + Rails.application.routes.url_helpers.topic_path(*url_helper_parameter(event)) end def event_url(event, activity) - Rails.application.routes.url_helpers.topic_url(url_helper_parameter(event), + Rails.application.routes.url_helpers.topic_url(*url_helper_parameter(event), host: ::Setting.host_name) end @@ -84,12 +84,9 @@ class Activity::MessageActivityProvider < Activity::BaseActivityProvider is_reply = !event['parent_id'].blank? if is_reply - parameters = { id: event['parent_id'], r: event['journable_id'], anchor: "message-#{event['journable_id']}" } + { id: event['parent_id'], r: event['journable_id'], anchor: "message-#{event['journable_id']}" } else - parameters = { id: event['journable_id'] } + [ event['journable_id'] ] end - - parameters[:board_id] = event['board_id'] - parameters end end