Merge pull request #81 from ariejan/fix_for_dashboard_grit_commit

Show commits as 'Commit' instead of 'Grit::Commit'
This commit is contained in:
Dmitriy Zaporozhets 2011-11-09 08:05:47 -08:00
commit c98301d759

View file

@ -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