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
0
Merge Requests
0
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
iv
gitlab-ce
Commits
a69249d9
Commit
a69249d9
authored
Nov 14, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'author_attributes_clean' into 'master'
Author attributes clean See merge request !1254
parents
7e3f49ba
ced24383
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
app/helpers/commits_helper.rb
app/helpers/commits_helper.rb
+6
-2
No files found.
app/helpers/commits_helper.rb
View file @
a69249d9
...
@@ -87,8 +87,8 @@ module CommitsHelper
...
@@ -87,8 +87,8 @@ module CommitsHelper
# avatar: true will prepend the avatar image
# avatar: true will prepend the avatar image
# size: size of the avatar image in px
# size: size of the avatar image in px
def
commit_person_link
(
commit
,
options
=
{})
def
commit_person_link
(
commit
,
options
=
{})
source_name
=
c
ommit
.
send
"
#{
options
[
:source
]
}
_name"
.
to_sym
source_name
=
c
lean
(
commit
.
send
"
#{
options
[
:source
]
}
_name"
.
to_sym
)
source_email
=
c
ommit
.
send
"
#{
options
[
:source
]
}
_email"
.
to_sym
source_email
=
c
lean
(
commit
.
send
"
#{
options
[
:source
]
}
_email"
.
to_sym
)
user
=
User
.
find_for_commit
(
source_email
,
source_name
)
user
=
User
.
find_for_commit
(
source_email
,
source_name
)
person_name
=
user
.
nil?
?
source_name
:
user
.
name
person_name
=
user
.
nil?
?
source_name
:
user
.
name
...
@@ -124,4 +124,8 @@ module CommitsHelper
...
@@ -124,4 +124,8 @@ module CommitsHelper
def
truncate_sha
(
sha
)
def
truncate_sha
(
sha
)
Commit
.
truncate_sha
(
sha
)
Commit
.
truncate_sha
(
sha
)
end
end
def
clean
(
string
)
Sanitize
.
clean
(
string
,
remove_contents:
true
)
end
end
end
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