OSDN Git Service
(root)
/
wvm
/
gitlab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e7e01c
)
Show commits as 'Commit' instead of 'Grit::Commit'
author
Ariejan de Vroom
<ariejan@ariejan.net>
Wed, 9 Nov 2011 15:59:51 +0000
(16:59 +0100)
committer
Ariejan de Vroom
<ariejan@ariejan.net>
Wed, 9 Nov 2011 15:59:51 +0000
(16:59 +0100)
app/helpers/dashboard_helper.rb
patch
|
blob
|
history
diff --git
a/app/helpers/dashboard_helper.rb
b/app/helpers/dashboard_helper.rb
index
0560af5
..
8921ee0
100644
(file)
--- a/
app/helpers/dashboard_helper.rb
+++ b/
app/helpers/dashboard_helper.rb
@@
-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