Skip to content
This repository

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

Merged
merged 1 commit into from about 2 years ago

4 participants

Thomas Leitner Don't Add Me To Your Organization a.k.a The Travis Bot Benny Degezelle john muhl
Thomas Leitner

No description provided.

john muhl johnmuhl closed this
john muhl johnmuhl reopened this
Don't Add Me To Your Organization a.k.a The Travis Bot

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

Benny Degezelle
Owner
jomz commented

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

john muhl
Owner

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

Benny Degezelle
Owner
jomz commented

Oh ok, thanks.

Benny Degezelle jomz merged commit 60ac92e into from
Benny Degezelle jomz closed this
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 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  app/helpers/application_helper.rb
2  app/helpers/application_helper.rb
@@ -186,7 +186,7 @@ def gravatar_url(email, options={})
186 186
187 187 # Default image url to be used when no gravatar is found
188 188 # or when an image exceeds the rating parameter.
189   - default_avatar_url = "#{request.protocol}#{request.host_with_port}/images/admin/avatar_#{([options[:size].to_i] * 2).join('x')}.png"
  189 + 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"
190 190 options[:default] ||= default_avatar_url
191 191
192 192 unless email.blank?

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.