Use secure.gravatar.com when running over SSL
This commit is contained in:
parent
786fe29db4
commit
85468fb4ce
2 changed files with 38 additions and 1 deletions
|
@ -1,7 +1,9 @@
|
|||
require 'digest/md5'
|
||||
module ApplicationHelper
|
||||
|
||||
def gravatar_icon(user_email)
|
||||
"http://www.gravatar.com/avatar/#{Digest::MD5.hexdigest(user_email)}?s=40&d=identicon"
|
||||
gravatar_host = request.ssl? ? "https://secure.gravatar.com" : "http://www.gravatar.com"
|
||||
"#{gravatar_host}/avatar/#{Digest::MD5.hexdigest(user_email)}?s=40&d=identicon"
|
||||
end
|
||||
|
||||
def fixed_mode?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue