aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/helpers/users_helper.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb
index 82ecb3273..6ebb20fc5 100644
--- a/app/helpers/users_helper.rb
+++ b/app/helpers/users_helper.rb
@@ -7,8 +7,10 @@ module UsersHelper
def user_default_avatar
return "#{root_url}#{image_path('icons/user.png')}" if Rails.application.config.relative_url_root.blank?
- relative_url_root = Rails.application.config.relative_url_root.sub( /\//, '')
- "#{root_url}#{image_path('icons/user.png')}".sub( Regexp.new("/#{relative_url_root}/#{relative_url_root}/"), "/#{relative_url_root}/")
+ relative_url_root = Rails.application.config.relative_url_root.gsub( /\//, '')
+ "#{root_url}#{image_path('icons/user.png')}".
+ sub( Regexp.new("/#{relative_url_root}/#{relative_url_root}/"), "/#{relative_url_root}/").
+ sub( Regexp.new("/#{relative_url_root}//#{relative_url_root}/"), "/#{relative_url_root}/")
end
end