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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
c98301d7
Commit
c98301d7
authored
Nov 09, 2011
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #81 from ariejan/fix_for_dashboard_grit_commit
Show commits as 'Commit' instead of 'Grit::Commit'
parents
6e7e01c7
4454b6c5
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 @
c98301d7
...
...
@@ -19,12 +19,15 @@ module DashboardHelper
end
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
"Issue"
then
object
.
title
when
"
Grit::
Commit"
then
object
.
safe_message
when
"Commit"
then
object
.
safe_message
else
""
end
"[
#{
object
.
class
.
name
}
]
#{
truncate
(
sanitize
(
title
,
:tags
=>
[]),
:length
=>
60
)
}
"
"[
#{
klass
}
]
#{
truncate
(
sanitize
(
title
,
:tags
=>
[]),
:length
=>
60
)
}
"
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