Commit c98301d7 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #81 from ariejan/fix_for_dashboard_grit_commit

Show commits as 'Commit' instead of 'Grit::Commit'
parents 6e7e01c7 4454b6c5
...@@ -19,12 +19,15 @@ module DashboardHelper ...@@ -19,12 +19,15 @@ module DashboardHelper
end end
def dashboard_feed_title(object) 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 "Note" then markdown(object.note)
when "Issue" then object.title when "Issue" then object.title
when "Grit::Commit" then object.safe_message when "Commit" then object.safe_message
else "" else ""
end end
"[#{object.class.name}] #{truncate(sanitize(title, :tags => []), :length => 60)} "
"[#{klass}] #{truncate(sanitize(title, :tags => []), :length => 60)} "
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment