Skip to content

Commit

Permalink
Merge pull request #334 from gettalong/patch-2
Browse files Browse the repository at this point in the history
Fixed display of default gravatar images when deployed to sub directory
  • Loading branch information
jomz committed Jun 10, 2012
2 parents 160f2ec + bf3d2a6 commit 60ac92e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Expand Up @@ -186,7 +186,7 @@ def gravatar_url(email, options={})


# Default image url to be used when no gravatar is found # Default image url to be used when no gravatar is found
# or when an image exceeds the rating parameter. # 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 options[:default] ||= default_avatar_url


unless email.blank? unless email.blank?
Expand Down

0 comments on commit 60ac92e

Please sign in to comment.