Commit e608eacc4bbbaf7c2b3bd81d3ef8a24da3df03be

Authored by Ariejan de Vroom
Committed by Dmitriy Zaporozhets
1 parent 85468fb4

Show commits as 'Commit' instead of 'Grit::Commit'

Conflicts:

	app/helpers/dashboard_helper.rb
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 return "Project Wall" 28 else return "Project Wall"
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