Permalink
Browse files

Fixed display of default gravatar images when deployed to sub directory

  • Loading branch information...
1 parent 85205bc commit bf3d2a6a30cb031e74f825728ce004ecb2614d5d @gettalong gettalong committed Apr 27, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 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?

0 comments on commit bf3d2a6

Please sign in to comment.