mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 03:37:56 +01:00
Add gravatar picture to header
This commit is contained in:
@@ -8,6 +8,11 @@ class User < ApplicationRecord
|
||||
self.role ||= :user
|
||||
end
|
||||
|
||||
def gravatar_url
|
||||
gravatar_id = Digest::MD5::hexdigest(email.downcase)
|
||||
"https://secure.gravatar.com/avatar/#{gravatar_id}"
|
||||
end
|
||||
|
||||
devise :database_authenticatable, :registerable,
|
||||
:recoverable, :rememberable, :validatable,
|
||||
:confirmable
|
||||
|
||||
Reference in New Issue
Block a user