Dont add title attr to user_avatar_without_link if has_tooltip is false

This commit is contained in:
Luke Bennett 2018-07-17 16:27:46 +01:00
parent 417e79bbbc
commit 58803cd8e0
No known key found for this signature in database
GPG Key ID: A738E9C68D3BF31A
1 changed files with 2 additions and 2 deletions

View File

@ -117,9 +117,9 @@ module AvatarsHelper
alt: "#{user_name}'s avatar",
src: avatar_url,
data: data_attributes,
class: css_class,
title: user_name
class: css_class
}
image_options[:title] = user_name if has_tooltip
tag(:img, image_options)
end