Commit 4454b6c593e51c5f23a7d391eb6a1f46aaa6bb45

Authored by Ariejan de Vroom
1 parent 6e7e01c7

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,12 +19,15 @@ module DashboardHelper
19 end 19 end
20 20
21 def dashboard_feed_title(object) 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 when "Note" then markdown(object.note) 25 when "Note" then markdown(object.note)
24 when "Issue" then object.title 26 when "Issue" then object.title
25 - when "Grit::Commit" then object.safe_message 27 + when "Commit" then object.safe_message
26 else "" 28 else ""
27 end 29 end
28 - "[#{object.class.name}] #{truncate(sanitize(title, :tags => []), :length => 60)} " 30 +
  31 + "[#{klass}] #{truncate(sanitize(title, :tags => []), :length => 60)} "
29 end 32 end
30 end 33 end