Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e6242106
Commit
e6242106
authored
Nov 26, 2016
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GeoAwareAvatar will pass all method attributes to `super`
parent
259c23dd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
app/models/ee/geo_aware_avatar.rb
app/models/ee/geo_aware_avatar.rb
+2
-2
app/models/group.rb
app/models/group.rb
+1
-1
app/models/project.rb
app/models/project.rb
+1
-1
No files found.
app/models/ee/geo_aware_avatar.rb
View file @
e6242106
...
...
@@ -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
...
...
app/models/group.rb
View file @
e6242106
...
...
@@ -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
...
...
app/models/project.rb
View file @
e6242106
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment