gitlabhq/app/helpers/dashboard_helper.rb

10 lines
304 B
Ruby
Raw Normal View History

2011-10-08 23:36:38 +02:00
module DashboardHelper
2011-10-31 21:57:16 +01:00
def path_to_object(project, object)
case object.class.name.to_s
when "Issue" then project_issues_path(project, project.issues.find(object.id))
when "Grit::Commit" then project_commit_path(project, project.repo.commits(object.id).first)
else "#"
end
end
2011-10-08 23:36:38 +02:00
end