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
Jérome Perrin
gitlab-ce
Commits
4454b6c5
Commit
4454b6c5
authored
Nov 09, 2011
by
Ariejan de Vroom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show commits as 'Commit' instead of 'Grit::Commit'
parent
6e7e01c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
app/helpers/dashboard_helper.rb
app/helpers/dashboard_helper.rb
+6
-3
No files found.
app/helpers/dashboard_helper.rb
View file @
4454b6c5
...
@@ -19,12 +19,15 @@ module DashboardHelper
...
@@ -19,12 +19,15 @@ module DashboardHelper
end
end
def
dashboard_feed_title
(
object
)
def
dashboard_feed_title
(
object
)
title
=
case
object
.
class
.
name
.
to_s
klass
=
object
.
class
.
to_s
.
split
(
"::"
).
last
title
=
case
klass
when
"Note"
then
markdown
(
object
.
note
)
when
"Note"
then
markdown
(
object
.
note
)
when
"Issue"
then
object
.
title
when
"Issue"
then
object
.
title
when
"
Grit::
Commit"
then
object
.
safe_message
when
"Commit"
then
object
.
safe_message
else
""
else
""
end
end
"[
#{
object
.
class
.
name
}
]
#{
truncate
(
sanitize
(
title
,
:tags
=>
[]),
:length
=>
60
)
}
"
"[
#{
klass
}
]
#{
truncate
(
sanitize
(
title
,
:tags
=>
[]),
:length
=>
60
)
}
"
end
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