Remove deprecated gravatar_url method
This commit is contained in:
parent
c292f51957
commit
47fde17560
|
@ -89,15 +89,6 @@ module ApplicationHelper
|
|||
((!current_user.nil?) && ((current_user == user) || current_user.mod?)) ? true : false
|
||||
end
|
||||
|
||||
# @deprecated Use {User#profile_picture.url} instead.
|
||||
def gravatar_url(user)
|
||||
return user.profile_picture.url :medium
|
||||
# return '/cage.png'
|
||||
#return '//www.gravatar.com/avatar' if user.nil?
|
||||
#return "//www.gravatar.com/avatar/#{Digest::MD5.hexdigest(user)}" if user.is_a? String
|
||||
#"//www.gravatar.com/avatar/#{Digest::MD5.hexdigest(user.email)}"
|
||||
end
|
||||
|
||||
def ios_web_app?
|
||||
user_agent = request.env['HTTP_USER_AGENT'] || 'Mozilla/5.0'
|
||||
# normal MobileSafari.app UA: Mozilla/5.0 (iPhone; CPU iPhone OS 8_1_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B435 Safari/600.1.4
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
.media
|
||||
- unless i.question.author_is_anonymous
|
||||
%a.pull-left{href: show_user_profile_path(i.question.user.screen_name)}
|
||||
%img.img-rounded.answerbox--img{src: gravatar_url(i.question.user)}
|
||||
%img.img-rounded.answerbox--img{src: i.question.user.profile_picture.url(:medium)}
|
||||
.media-body
|
||||
%h6.text-muted.media-heading.answerbox--question-user
|
||||
= raw t('views.inbox.entry.asked', user: user_screen_name(i.question.user, anonymous: i.question.author_is_anonymous), time: time_tooltip(i.question))
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
%li{data: { comment_id: comment.id }}
|
||||
.media.comments--media
|
||||
.pull-left
|
||||
%img.img-rounded.answerbox--img{src: gravatar_url(comment.user)}
|
||||
%img.img-rounded.answerbox--img{src: comment.user.profile_picture.url(:medium)}
|
||||
.media-body.comments--body
|
||||
%h6.media-heading.answerbox--question-user
|
||||
= user_screen_name comment.user
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- unless report.nil? or report.target.nil? or report.user.nil? or report.type.nil?
|
||||
.panel.panel-default.moderationbox{data: { id: report.id }}
|
||||
.panel-heading
|
||||
%img.img-rounded.answerbox--img{src: gravatar_url(report.user)}
|
||||
%img.img-rounded.answerbox--img{src: report.user.profile_picture.url(:medium)}
|
||||
= raw t('views.moderation.moderationbox.reported', user: user_screen_name(report.user), content: report.type.sub('Reports::', ''), time: time_tooltip(report))
|
||||
.panel-body
|
||||
%p
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
.media.question-media
|
||||
- unless a.question.author_is_anonymous
|
||||
%a.pull-left{href: show_user_profile_path(a.question.user.screen_name)}
|
||||
%img.img-rounded.answerbox--img{src: gravatar_url(a.question.user)}
|
||||
%img.img-rounded.answerbox--img{src: a.question.user.profile_picture.url(:medium)}
|
||||
.media-body.question-body
|
||||
- if user_signed_in?
|
||||
.pull-right
|
||||
|
@ -49,7 +49,7 @@
|
|||
.media
|
||||
.pull-left
|
||||
%a{href: show_user_profile_path(a.user.screen_name)}
|
||||
%img.img-rounded.answerbox--img{src: gravatar_url(a.user)}
|
||||
%img.img-rounded.answerbox--img{src: a.user.profile_picture.url(:medium)}
|
||||
.media-body
|
||||
%h6.media-heading.answerbox--answer-user
|
||||
= raw t('views.answerbox.answered', hide: hidespan(t('views.answerbox.hide'), "xs"), user: user_screen_name(a.user))
|
||||
|
|
|
@ -14,5 +14,5 @@
|
|||
- comment.smiles.all.each do |smile|
|
||||
%li.user-list-entry.user-list-entry-smiles
|
||||
%a{href: show_user_profile_path(smile.user.screen_name)}
|
||||
%img.img-rounded{src: gravatar_url(smile.user), alt: user_screen_name(smile.user, url: false)}
|
||||
%img.img-rounded{src: smile.user), alt: user_screen_name(smile.user, url: false.profile_picture.url(:medium)}
|
||||
%span= user_screen_name(smile.user, url: false)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
%div{class: "ab-comment-smile-list", style: "height: 0; width: 0"}= render "shared/comment_smiles", comment: comment
|
||||
.media.comments--media
|
||||
.pull-left
|
||||
%img.img-rounded.answerbox--img{src: gravatar_url(comment.user)}
|
||||
%img.img-rounded.answerbox--img{src: comment.user.profile_picture.url(:medium)}
|
||||
.media-body.comments--body
|
||||
%h6.media-heading.answerbox--question-user
|
||||
= user_screen_name comment.user
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
.media.question-media
|
||||
- unless question.author_is_anonymous
|
||||
%a.pull-left{href: unless hidden then show_user_profile_path(question.user.screen_name) end}
|
||||
%img.img-rounded.answerbox--img{src: gravatar_url(question.user)}
|
||||
%img.img-rounded.answerbox--img{src: question.user.profile_picture.url(:medium)}
|
||||
.media-body.question-body
|
||||
- if user_signed_in?
|
||||
.pull-right
|
||||
|
|
|
@ -7,4 +7,4 @@
|
|||
- else
|
||||
- a.smiles.all.each do |smile|
|
||||
%a{href: show_user_profile_path(smile.user.screen_name), title: smile.user.screen_name, data: { toggle: :tooltip, placement: :top, smile_id: smile.id }}
|
||||
%img.img-rounded.answerbox--img-small{src: gravatar_url(smile.user)}
|
||||
%img.img-rounded.answerbox--img-small{src: smile.user.profile_picture.url(:medium)}
|
Loading…
Reference in New Issue