Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgitlabhq <m@gitlabhq.com>2011-11-01 00:57:16 +0400
committergitlabhq <m@gitlabhq.com>2011-11-01 00:57:16 +0400
commit485c5199b7ea01b85bdacb15a41bcfb18451597c (patch)
treee1a7a2915f77140f6e2e3765574e376622f7e0c2 /app/helpers/dashboard_helper.rb
parent267bd6068c7a57316ef357f9385e12fea6c8d69f (diff)
user dashboard
Diffstat (limited to 'app/helpers/dashboard_helper.rb')
-rw-r--r--app/helpers/dashboard_helper.rb7
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