diff options
Diffstat (limited to 'app/helpers/users_helper.rb')
| -rw-r--r-- | app/helpers/users_helper.rb | 8 |
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 |
