diff --git a/app/controllers/problems_controller.rb b/app/controllers/problems_controller.rb --- a/app/controllers/problems_controller.rb +++ b/app/controllers/problems_controller.rb @@ -11,11 +11,10 @@ end # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) - verify :method => :post, :only => [ :destroy, - :create, :quick_create, + verify :method => :post, :only => [ :create, :quick_create, :do_manage, :do_import, - ], + ], :redirect_to => { :action => :index } def show @@ -115,8 +114,8 @@ end def destroy - Problem.find(params[:id]).destroy - redirect_to action: :index + p = Problem.find(params[:id]).destroy + redirect_to action: :index end def toggle diff --git a/app/controllers/user_admin_controller.rb b/app/controllers/user_admin_controller.rb --- a/app/controllers/user_admin_controller.rb +++ b/app/controllers/user_admin_controller.rb @@ -7,7 +7,7 @@ before_filter :admin_authorization # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) - verify :method => :post, :only => [ :destroy, + verify :method => :post, :only => [ :create, :create_from_list, :update, :manage_contest,