aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorMarc Florisson2012-09-07 16:54:00 +0200
committerMarc Florisson2012-09-07 16:54:00 +0200
commit9d8f1101e80c3392f3030f0a3edd1a16b17a8c0c (patch)
tree2856c0e8266c6e81aa72baf47ace03ce9e9dc62f /app
parent649e931ed4fd282229c7aca65092b03e13c57b0c (diff)
downloadchouette-core-9d8f1101e80c3392f3030f0a3edd1a16b17a8c0c.tar.bz2
fix user_default_avatar
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