diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-12 13:56:53 -0700 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-12 13:56:53 -0700 |
commit | 7ac62388a5ba030dd60e6aef971eb32adf39ed0d (patch) | |
tree | 785c18e1d53231059431a8eb538a5392f36efca4 /app/helpers/application_helper.rb | |
parent | 0f144f36bc5703ba745a8a6d1cde14fb694c4e34 (diff) | |
download | gitlab-ce-7ac62388a5ba030dd60e6aef971eb32adf39ed0d.tar.gz |
Prevent database query each time we render group avatar
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r-- | app/helpers/application_helper.rb | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a81e41819b7..8ed6d59c20d 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -86,15 +86,6 @@ module ApplicationHelper end end - def group_icon(group_path) - group = Group.find_by(path: group_path) - if group && group.avatar.present? - group.avatar.url - else - image_path('no_group_avatar.png') - end - end - def avatar_icon(user_email = '', size = nil) user = User.find_by(email: user_email) |