summaryrefslogtreecommitdiff
path: root/app/models/group.rb
diff options
context:
space:
mode:
authorblackst0ne <blackst0ne.ru@gmail.com>2017-05-10 15:26:17 +1100
committerblackst0ne <blackst0ne.ru@gmail.com>2017-05-10 15:26:17 +1100
commit29a3203b3fe08649b80def65b7750a866454d3d6 (patch)
treed4e644c142b1ecc6dd869c636ad5657c546d901b /app/models/group.rb
parentecc6cc8be75b5c66fdf7f5595b71aabf9366a5e1 (diff)
downloadgitlab-ce-29a3203b3fe08649b80def65b7750a866454d3d6.tar.gz
Use relative paths for group/project/user avatars
Diffstat (limited to 'app/models/group.rb')
-rw-r--r--app/models/group.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/models/group.rb b/app/models/group.rb
index cbc10b00cf5..6aab477f431 100644
--- a/app/models/group.rb
+++ b/app/models/group.rb
@@ -4,6 +4,7 @@ class Group < Namespace
include Gitlab::ConfigHelper
include Gitlab::VisibilityLevel
include AccessRequestable
+ include Avatarable
include Referable
include SelectForProjectAuthorization
@@ -111,10 +112,10 @@ class Group < Namespace
allowed_by_projects
end
- def avatar_url(size = nil)
- if self[:avatar].present?
- [gitlab_config.url, avatar.url].join
- end
+ def avatar_url(**args)
+ # We use avatar_path instead of overriding avatar_url because of carrierwave.
+ # See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11001/diffs#note_28659864
+ avatar_path(args)
end
def lfs_enabled?