Code cleanup, removed conditions on request method.

git-svn-id: http://svn.redmine.org/redmine/trunk@13538 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2014-11-02 20:32:11 +00:00
parent ea2df369dc
commit 50bb640c53

View File

@ -206,16 +206,16 @@ class ProjectsController < ApplicationController
end
def archive
if request.post?
unless @project.archive
flash[:error] = l(:error_can_not_archive_project)
end
unless @project.archive
flash[:error] = l(:error_can_not_archive_project)
end
redirect_to admin_projects_path(:status => params[:status])
end
def unarchive
@project.unarchive if request.post? && !@project.active?
unless @project.active?
@project.unarchive
end
redirect_to admin_projects_path(:status => params[:status])
end