cleanup
This commit is contained in:
@@ -4,9 +4,8 @@ module UsersHelper
|
||||
klass = options.fetch(:class) { '' }
|
||||
round_corners = options.fetch(:round_corners) { true }
|
||||
|
||||
data_attributes = { height: size, width: size, "font-size" => (size * 0.6) }
|
||||
data_attributes = { name: user.name, height: size, width: size, "font-size" => (size * 0.6) }
|
||||
data_attributes.merge!(radius: (size * 0.13).round) if round_corners
|
||||
data_attributes.merge!(name: user.name)
|
||||
|
||||
content_tag :img, nil, class: "avatar #{klass}", data: data_attributes
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user