aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/users_helper.rb
diff options
context:
space:
mode:
authorMichel Etienne2015-01-08 17:12:27 +0100
committerMichel Etienne2015-01-08 17:12:27 +0100
commit8a4bb1eb66da1140375071ea153b83946b07aa71 (patch)
treef13dc027df0e31406a745e6c592e1ca536b36311 /app/helpers/users_helper.rb
parentd31369e508a37a46e57146ef9157b0d140c3b073 (diff)
downloadchouette-core-8a4bb1eb66da1140375071ea153b83946b07aa71.tar.bz2
manage unauthenticated_root
Diffstat (limited to 'app/helpers/users_helper.rb')
-rw-r--r--app/helpers/users_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb
index 0ddea8356..a4347bd18 100644
--- a/app/helpers/users_helper.rb
+++ b/app/helpers/users_helper.rb
@@ -5,10 +5,10 @@ module UsersHelper
end
def user_default_avatar
- return "#{root_url}#{image_path('icons/user.png')}" if Rails.application.config.relative_url_root.blank?
+ return "#{authenticated_root_url}#{image_path('icons/user.png')}" if Rails.application.config.relative_url_root.blank?
relative_url_root = Rails.application.config.relative_url_root.gsub( /\//, '')
- "#{root_url}#{image_path('icons/user.png')}".
+ "#{authenticated_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