diff options
Diffstat (limited to 'app/helpers/dashboard_helper.rb')
-rw-r--r-- | app/helpers/dashboard_helper.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/helpers/dashboard_helper.rb b/app/helpers/dashboard_helper.rb index a94ddfc2e33..878c877d2f3 100644 --- a/app/helpers/dashboard_helper.rb +++ b/app/helpers/dashboard_helper.rb @@ -1,2 +1,9 @@ module DashboardHelper + 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 end |