mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
Allow specifying a size for user image
This commit is contained in:
parent
6475d52a56
commit
59e4ca8164
@ -66,7 +66,7 @@ class User < ActiveRecord::Base
|
||||
def image_url(size=80)
|
||||
email_md5 = Digest::MD5.hexdigest(email.downcase)
|
||||
# 80px is Gravatar's default size
|
||||
"https://www.gravatar.com/avatar/#{email_md5}?d=identicon&s=#{size}"
|
||||
"https://www.gravatar.com/avatar/#{email_md5}?d=identicon&s=#{size}".html_safe
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Loading…
Reference in New Issue
Block a user