comparison 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
comparison
equal deleted inserted replaced
228:2a4ed5b73c73 229:12287b32fbda
20 urls[url] || url 20 urls[url] || url
21 end 21 end
22 end 22 end
23 23
24 def status_url(tweet) 24 def status_url(tweet)
25 "https://twitter.com/#{tweet.user.screen_name.presence || '_'}/status/#{tweet.id}" 25 status_url_base tweet.user.screen_name, tweet.id
26 end
27
28 def status_url_base(screen_name, tweet_id)
29 "https://twitter.com/#{screen_name.presence || '_'}/status/#{tweet_id}"
26 end 30 end
27 end 31 end