diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-02 20:32:11 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-02 20:32:11 +0000 |
commit | 50bb640c533e4fa3ad33899649d77b28562204bd (patch) | |
tree | 2a95306b948fba92c61c2c14b30643b1fd8f6a32 /app/controllers/projects_controller.rb | |
parent | ea2df369dca1d96dca16b8a684ef8928586ebd26 (diff) | |
download | redmine-50bb640c533e4fa3ad33899649d77b28562204bd.tar.gz redmine-50bb640c533e4fa3ad33899649d77b28562204bd.zip |
Code cleanup, removed conditions on request method.
git-svn-id: http://svn.redmine.org/redmine/trunk@13538 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/projects_controller.rb')
-rw-r--r-- | app/controllers/projects_controller.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 0a6b487a8..8f5e3697b 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -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 |