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

Merged
merged 1 commit into from Jun 10, 2012
Jump to file or symbol
Failed to load files and symbols.
+1 −1
Diff settings

Always

Just for now

@@ -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?