Replace remaining usages of `user.display_name`
This commit is contained in:
parent
df606a768e
commit
842f51d745
|
@ -3,7 +3,7 @@ module UserHelper
|
|||
# @return [String] The user name
|
||||
def user_screen_name(user, anonymous: false, url: true, link_only: false)
|
||||
return APP_CONFIG['anonymous_name'] if user.nil? || anonymous
|
||||
name = user.display_name.blank? ? user.screen_name : user.display_name
|
||||
name = user.profile.display_name.blank? ? user.screen_name : user.profile.display_name
|
||||
if url
|
||||
link = show_user_profile_path(user.screen_name)
|
||||
return link if link_only
|
||||
|
|
|
@ -32,7 +32,7 @@ class Services::Tumblr < Service
|
|||
asker = if answer.question.author_is_anonymous?
|
||||
APP_CONFIG['anonymous_name']
|
||||
else
|
||||
answer.question.user.display_name.blank? ? answer.question.user.screen_name : answer.question.user.display_name
|
||||
answer.question.user.profile.display_name.blank? ? answer.question.user.screen_name : answer.question.user.profile.display_name
|
||||
end
|
||||
client.text(
|
||||
self.uid,
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
%img.avatar-md.mr-2{ src: u.profile_picture.url(:medium) }
|
||||
.media-body
|
||||
%h6.media-heading.answerbox__question-user
|
||||
- if u.display_name.blank?
|
||||
- if u.profile.display_name.blank?
|
||||
%a{ href: show_user_profile_path(u.screen_name) }
|
||||
= u.screen_name
|
||||
- else
|
||||
%a{ href: show_user_profile_path(u.screen_name) }
|
||||
= u.display_name
|
||||
= u.profile.display_name
|
||||
%span.text-muted= u.screen_name
|
||||
%p.answerbox__question-text
|
||||
- case type
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
.card-body
|
||||
%img.userbox__avatar{ src: user.profile_picture.url(:small) }
|
||||
%a.profile__name{ href: show_user_profile_path(user.screen_name) }
|
||||
- unless user.display_name.blank?
|
||||
- unless user.profile.display_name.blank?
|
||||
.profile__display-name
|
||||
= user.display_name
|
||||
= user.profile.display_name
|
||||
.profile__screen-name
|
||||
= user.screen_name
|
||||
.row
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
.card-body
|
||||
%img.userbox__avatar{ src: user.profile_picture.url(:small) }
|
||||
%a.profile__name{ href: show_user_profile_path(user.screen_name) }
|
||||
- unless user.display_name.blank?
|
||||
- unless user.profile.display_name.blank?
|
||||
.profile__display-name
|
||||
= user.display_name
|
||||
= user.profile.display_name
|
||||
.profile__screen-name
|
||||
= user.screen_name
|
||||
= render 'user/actions', user: user, type: type
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
%img.profile__avatar{ src: user.profile_picture.url(:large) }
|
||||
.card-body
|
||||
.profile__name
|
||||
- unless user.display_name.blank?
|
||||
- unless user.profile.display_name.blank?
|
||||
.profile__display-name
|
||||
= user.display_name
|
||||
= user.profile.display_name
|
||||
.profile__screen-name
|
||||
= user.screen_name
|
||||
.profile__badge-container
|
||||
|
|
Loading…
Reference in New Issue