Mercurial > rsstweet
diff app/helpers/application_helper.rb @ 229:12287b32fbda
Show link to parent tweet for replies
author | nanaya <me@nanaya.pro> |
---|---|
date | Wed, 13 Apr 2022 01:49:51 +0900 |
parents | 70e90ea4b870 |
children | 7a773720d81f |
line wrap: on
line diff
--- a/app/helpers/application_helper.rb Wed Apr 13 01:41:50 2022 +0900 +++ b/app/helpers/application_helper.rb Wed Apr 13 01:49:51 2022 +0900 @@ -22,6 +22,10 @@ end def status_url(tweet) - "https://twitter.com/#{tweet.user.screen_name.presence || '_'}/status/#{tweet.id}" + status_url_base tweet.user.screen_name, tweet.id + end + + def status_url_base(screen_name, tweet_id) + "https://twitter.com/#{screen_name.presence || '_'}/status/#{tweet_id}" end end