shorten long line of ProjectsController

git-svn-id: http://svn.redmine.org/redmine/trunk@20356 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA
2020-11-13 12:40:10 +00:00
parent c4ee00ca65
commit 67d8f2e5df

View File

@@ -275,7 +275,11 @@ class ProjectsController < ApplicationController
if api_request? || params[:confirm]
@project_to_destroy.destroy
respond_to do |format|
format.html { redirect_to User.current.admin? ? admin_projects_path : projects_path }
format.html do
redirect_to(
User.current.admin? ? admin_projects_path : projects_path
)
end
format.api { render_api_ok }
end
end