diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-25 16:04:50 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-25 16:04:50 +0200 |
commit | 2d31568b27d60b2868d60da905018bdcba862c59 (patch) | |
tree | b914671c3e95ff67ea81cdf3a23605edc44eec45 /app/helpers/gitlab_routing_helper.rb | |
parent | d315d1eba4f45c4c4f0417fbdcd3eaf69e102282 (diff) | |
download | gitlab-ce-2d31568b27d60b2868d60da905018bdcba862c59.tar.gz |
Refactor issue and merge request sidebar
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/helpers/gitlab_routing_helper.rb')
-rw-r--r-- | app/helpers/gitlab_routing_helper.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/gitlab_routing_helper.rb b/app/helpers/gitlab_routing_helper.rb index 9703c8d9e9c..9d072f81092 100644 --- a/app/helpers/gitlab_routing_helper.rb +++ b/app/helpers/gitlab_routing_helper.rb @@ -52,4 +52,12 @@ module GitlabRoutingHelper def project_snippet_url(entity, *args) namespace_project_snippet_url(entity.project.namespace, entity.project, entity, *args) end + + def toggle_subscription_path(entity, *args) + if entity.is_a?(Issue) + toggle_subscription_namespace_project_issue_path(entity.project.namespace, entity.project, entity) + else + toggle_subscription_namespace_project_merge_request_path(entity.project.namespace, entity.project, entity) + end + end end |