Commit 12716a45 authored by Eugen Rochko's avatar Eugen Rochko

Handle Twitter links created before display_name was filled

parent 296fc517
- collection.each do |user| - collection.each do |user|
.user-map .user-map
.twitter= link_to "@#{user.twitter.display_name}", "https://twitter.com/#{user.twitter.display_name}" .twitter
- if user.twitter.display_name.present?
= link_to "@#{user.twitter.display_name}", "https://twitter.com/#{user.twitter.display_name}"
- else
= link_to user.twitter.uid, "https://twitter.com/intent/user?user_id=#{user.twitter.uid}"
.to= fa_icon('chevron-right') .to= fa_icon('chevron-right')
- if user.mastodon - if user.mastodon
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
accounts accounts
- if twitter? - if twitter?
.login-name .login-name
%strong= current_user.twitter.display_name %strong= current_user.twitter.display_name.presence || current_user.twitter.uid
= fa_icon 'check' = fa_icon 'check'
- else - else
%span.login-btn Connect Twitter %span.login-btn Connect Twitter
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment