Changed IssuesController#destroy to DELETE only.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8150 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2011-12-10 09:10:51 +00:00
parent a1ae0aed23
commit 52a7fa6176
5 changed files with 13 additions and 15 deletions
+1 -4
View File
@@ -54,10 +54,6 @@ class IssuesController < ApplicationController
helper :gantt
include Redmine::Export::PDF
verify :method => [:post, :delete],
:only => :destroy,
:render => { :nothing => true, :status => :method_not_allowed }
verify :method => :post, :only => :create, :render => {:nothing => true, :status => :method_not_allowed }
verify :method => :post, :only => :bulk_update, :render => {:nothing => true, :status => :method_not_allowed }
verify :method => :put, :only => :update, :render => {:nothing => true, :status => :method_not_allowed }
@@ -225,6 +221,7 @@ class IssuesController < ApplicationController
redirect_back_or_default({:controller => 'issues', :action => 'index', :project_id => @project})
end
verify :method => :delete, :only => :destroy, :render => { :nothing => true, :status => :method_not_allowed }
def destroy
@hours = TimeEntry.sum(:hours, :conditions => ['issue_id IN (?)', @issues]).to_f
if @hours > 0