]> cat aescling's git repositories - mastodon.git/commit
Remove some code in TagManager and spec (#3547)
authorAkihiko Odaki (@fn_aki@pawoo.net) <akihiko.odaki.4i@stu.hosei.ac.jp>
Sun, 4 Jun 2017 14:14:25 +0000 (23:14 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Sun, 4 Jun 2017 14:14:25 +0000 (16:14 +0200)
commite07b57852e951efebae7e2380a3691236420072d
treea5f4ec469eb511abe451cc5f5091aed9be2cd22d
parent7c7c18fdea52ce288a87d2455f1efc55f74af003
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
spec/lib/tag_manager_spec.rb