diff --git a/app/views/layouts/base_newcontest.html.erb b/app/views/layouts/base_newcontest.html.erb
index e621f2f8..97a6c149 100644
--- a/app/views/layouts/base_newcontest.html.erb
+++ b/app/views/layouts/base_newcontest.html.erb
@@ -82,7 +82,7 @@
- <%= link_to l(:label_contest_delete), {:controller => 'contests', :action => 'destroy_contest', :id => @contest}, data: { confirm: '你确定要删除该竞赛吗?' } %>
+ <%= link_to l(:label_contest_delete), {:controller => 'contests', :action => 'destroy_contest', :id => @contest}, data: { confirm: '你确定要删除该竞赛吗?' }, method: :delete %>
|
<% end %>
diff --git a/config/routes.rb b/config/routes.rb
index 91c2047b..eb7b890c 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -80,6 +80,7 @@ RedmineApp::Application.routes.draw do
match 'new' , via: :post
end
member do
+ delete 'destroy_contest'
match 'add_softapplication'
match 'update_contest' , via: [:put]
match 'show_contest' , via: :get