From: Ariejan de Vroom Date: Wed, 9 Nov 2011 15:59:51 +0000 (+0100) Subject: Show commits as 'Commit' instead of 'Grit::Commit' X-Git-Tag: v1.2.0pre~75^2^2~1^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4454b6c593e51c5f23a7d391eb6a1f46aaa6bb45;p=wvm%2Fgitlab.git Show commits as 'Commit' instead of 'Grit::Commit' --- diff --git a/app/helpers/dashboard_helper.rb b/app/helpers/dashboard_helper.rb index 0560af5da..8921ee085 100644 --- a/app/helpers/dashboard_helper.rb +++ b/app/helpers/dashboard_helper.rb @@ -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