Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixed display of default gravatar images when deployed to sub directory #334

Merged
merged 1 commit into from

4 participants

@gettalong

No description provided.

@johnmuhl johnmuhl closed this
@johnmuhl johnmuhl reopened this
@travisbot

This pull request passes (merged bf3d2a6 into 85205bc).

@jomz
Owner

Hi John, any reason you re-opened this pull request? Looks like it can be merged.

@johnmuhl
Owner

@jomz i closed/reopened just to get travis to build it since it was added before we got PR testing

@jomz
Owner

Oh ok, thanks.

@jomz jomz merged commit 60ac92e into radiant:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  app/helpers/application_helper.rb
View
2  app/helpers/application_helper.rb
@@ -186,7 +186,7 @@ def gravatar_url(email, options={})
# Default image url to be used when no gravatar is found
# or when an image exceeds the rating parameter.
- default_avatar_url = "#{request.protocol}#{request.host_with_port}/images/admin/avatar_#{([options[:size].to_i] * 2).join('x')}.png"
+ default_avatar_url = "#{request.protocol}#{request.host_with_port}#{ActionController::Base.relative_url_root}/images/admin/avatar_#{([options[:size].to_i] * 2).join('x')}.png"
options[:default] ||= default_avatar_url
unless email.blank?
Something went wrong with that request. Please try again.