From e07b57852e951efebae7e2380a3691236420072d Mon Sep 17 00:00:00 2001 From: "Akihiko Odaki (@fn_aki@pawoo.net)" Date: Sun, 4 Jun 2017 23:14:25 +0900 Subject: Remove some code in TagManager and spec (#3547) * Do not fall back to StreamEntry if object_type is unavailable in TagManager Since 6d6a429af8fe4bd92ed497f401676353fdc603e0, when Status, the only model with stream_entry, and StreamEntry got its own logic in uri_for and url_for, the purpose of the fallbacks to activity_type of StreamEntry became unclear. This commit removes the fallbacks. When adding another model with stream_entry in future, consider to update uri_for and url_for. * Cover TagManager more --- app/lib/tag_manager.rb | 4 ---- 1 file changed, 4 deletions(-) (limited to 'app') diff --git a/app/lib/tag_manager.rb b/app/lib/tag_manager.rb index 55aed92e3..f1a2234dc 100644 --- a/app/lib/tag_manager.rb +++ b/app/lib/tag_manager.rb @@ -93,8 +93,6 @@ class TagManager account_url(target) when :note, :comment, :activity unique_tag(target.created_at, target.id, 'Status') - else - unique_tag(target.stream_entry.created_at, target.stream_entry.activity_id, target.stream_entry.activity_type) end end @@ -106,8 +104,6 @@ class TagManager short_account_url(target) when :note, :comment, :activity short_account_status_url(target.account, target) - else - account_stream_entry_url(target.account, target.stream_entry) end end end -- cgit