diff options
author | Gabriel Mazetto <gabriel@gitlab.com> | 2016-11-26 07:11:05 +0100 |
---|---|---|
committer | Gabriel Mazetto <gabriel@gitlab.com> | 2016-11-26 07:11:05 +0100 |
commit | b72bd838d76015fb9ef0ab4d8be57a9c8130b744 (patch) | |
tree | 7d8f2d0231f56d68d271890265573b54fd73447b | |
parent | 12e856a751a1e8598a7a17998e973874c3391bd1 (diff) | |
download | gitlab-ce-b72bd838d76015fb9ef0ab4d8be57a9c8130b744.tar.gz |
Backporting little groups_helper refactor from gitlab-org/gitlab-ee!904backport/groups-helper-refactor
-rw-r--r-- | app/helpers/groups_helper.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb index 75cd9eece5c..19ab059aea6 100644 --- a/app/helpers/groups_helper.rb +++ b/app/helpers/groups_helper.rb @@ -8,11 +8,7 @@ module GroupsHelper group = Group.find_by(path: group) end - if group && group.avatar.present? - group.avatar.url - else - image_path('no_group_avatar.png') - end + group.try(:avatar_url) || image_path('no_group_avatar.png') end def group_title(group, name = nil, url = nil) |