diff options
author | Stan Hu <stanhu@gmail.com> | 2016-08-06 07:25:51 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-08-10 09:28:21 -0700 |
commit | 4955a47cb1c52168114364e45a2fccf6bc105452 (patch) | |
tree | 50bb5ea1979a596edef53817aea75796686fc2a9 /app/controllers/projects_controller.rb | |
parent | ae2d3c417075c83e169ab7662f3dd11e3b2bf043 (diff) | |
download | gitlab-ce-4955a47cb1c52168114364e45a2fccf6bc105452.tar.gz |
Clean up project destructionclean-up-project-destroy
Instead of redirecting from the project service to the service and back to the model,
put all destruction code in the service. Also removes a possible source of failure
where run_after_commit may not destroy the project.
Diffstat (limited to 'app/controllers/projects_controller.rb')
-rw-r--r-- | app/controllers/projects_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index a6e1aa5ccc1..207f9d6a77f 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -125,7 +125,7 @@ class ProjectsController < Projects::ApplicationController def destroy return access_denied! unless can?(current_user, :remove_project, @project) - ::Projects::DestroyService.new(@project, current_user, {}).pending_delete! + ::Projects::DestroyService.new(@project, current_user, {}).async_execute flash[:alert] = "Project '#{@project.name}' will be deleted." redirect_to dashboard_projects_path |