Commit 4454b6c593e51c5f23a7d391eb6a1f46aaa6bb45
1 parent
6e7e01c7
Exists in
master
and in
4 other branches
Show commits as 'Commit' instead of 'Grit::Commit'
Showing
1 changed file
with
6 additions
and
3 deletions
Show diff stats
app/helpers/dashboard_helper.rb
... | ... | @@ -19,12 +19,15 @@ module DashboardHelper |
19 | 19 | end |
20 | 20 | |
21 | 21 | def dashboard_feed_title(object) |
22 | - title = case object.class.name.to_s | |
22 | + klass = object.class.to_s.split("::").last | |
23 | + | |
24 | + title = case klass | |
23 | 25 | when "Note" then markdown(object.note) |
24 | 26 | when "Issue" then object.title |
25 | - when "Grit::Commit" then object.safe_message | |
27 | + when "Commit" then object.safe_message | |
26 | 28 | else "" |
27 | 29 | end |
28 | - "[#{object.class.name}] #{truncate(sanitize(title, :tags => []), :length => 60)} " | |
30 | + | |
31 | + "[#{klass}] #{truncate(sanitize(title, :tags => []), :length => 60)} " | |
29 | 32 | end |
30 | 33 | end | ... | ... |