aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/users_helper.rb
diff options
context:
space:
mode:
authorMichel Etienne2015-01-26 13:12:24 +0100
committerMichel Etienne2015-01-26 13:12:24 +0100
commit34dcd6afff1fc8581649cb1b400a66969b0f65ae (patch)
tree59132309c796770ce2275e0317e8bb283ab8612f /app/helpers/users_helper.rb
parent657966f57ab15234effcc56d58ff49dace885576 (diff)
parentc3ed60be997734921c8305f24b78e997e52a9cd3 (diff)
downloadchouette-core-34dcd6afff1fc8581649cb1b400a66969b0f65ae.tar.bz2
merge branch V2_5
Diffstat (limited to 'app/helpers/users_helper.rb')
-rw-r--r--app/helpers/users_helper.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb
index 0dfc1552f..11fd7af34 100644
--- a/app/helpers/users_helper.rb
+++ b/app/helpers/users_helper.rb
@@ -4,6 +4,14 @@ module UsersHelper
image_tag user_image(user), :alt => "", :class => "preview", :width => size, :height => size
end
+# def user_default_avatar
+# 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( /\//, '')
+# "#{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
+
def gravatar_hash(user)
Digest::MD5.hexdigest( user.email)
end