Commit e6242106 authored by Gabriel Mazetto's avatar Gabriel Mazetto

GeoAwareAvatar will pass all method attributes to `super`

parent 259c23dd
......@@ -4,11 +4,11 @@ module EE
# This module is intended to encapsulate Geo-specific logic
# and be **prepended** in the `Group`, `User`, `Project` models
module GeoAwareAvatar
def avatar_url(size = nil)
def avatar_url(size = nil, scale = 2)
if self[:avatar].present? && ::Gitlab::Geo.secondary?
File.join(::Gitlab::Geo.primary_node.url, avatar.url)
else
super()
super
end
end
end
......
......@@ -115,7 +115,7 @@ class Group < Namespace
allowed_by_projects
end
def avatar_url(size = nil)
def avatar_url(size = nil, scale = nil)
if self[:avatar].present?
[gitlab_config.url, avatar.url].join
end
......
......@@ -912,7 +912,7 @@ class Project < ActiveRecord::Base
repository.avatar
end
def avatar_url
def avatar_url(size = nil, scale = nil)
if self[:avatar].present?
[gitlab_config.url, avatar.url].join
elsif avatar_in_git
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment