From 7f43049012cb9fed1208a7ede13e4279c4d89c82 Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Thu, 24 Mar 2016 14:29:09 -0500 Subject: Fix cancel link on issuable edit form --- app/views/shared/issuable/_form.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml index b01a36265f9..6606904c77a 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -135,4 +135,4 @@ method: :delete, class: 'btn btn-grouped' do = icon('trash-o') Delete - = link_to 'Cancel', namespace_project_issue_path(@project.namespace, @project, issuable), class: 'btn btn-grouped btn-cancel' + = link_to 'Cancel', polymorphic_path([@project.namespace.becomes(Namespace), @project, issuable]), class: 'btn btn-grouped btn-cancel' -- cgit v1.2.1 From 35ef7ff6cb9bd4fbc0ebb9cae8bc495d6a9d626e Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Thu, 24 Mar 2016 14:40:20 -0500 Subject: Fix link when issuable is new --- app/views/shared/issuable/_form.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml index 6606904c77a..6a42a6e3f58 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -127,7 +127,7 @@ for this project. - if issuable.new_record? - = link_to 'Cancel', namespace_project_issues_path(@project.namespace, @project), class: 'btn btn-cancel' + = link_to 'Cancel', polymorphic_path([@project.namespace, @project, issuable.class]), class: 'btn btn-cancel' - else .pull-right - if current_user.can?(:"destroy_#{issuable.to_ability_name}", @project) -- cgit v1.2.1