summaryrefslogtreecommitdiff
path: root/app/controllers/projects_controller.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-10-27 17:46:58 +0100
committerDouwe Maan <douwe@gitlab.com>2015-10-27 17:46:58 +0100
commit5b8e0f17a8e77bf4cbdb4ed61d116d29d9f3c9c7 (patch)
tree606bd29af2da226a85c1aa1953c2c2a21d476d84 /app/controllers/projects_controller.rb
parent35d433a3200b64f80a21b940f68d97a4392611f2 (diff)
parent940d68cc4c349b574166b010666a36cf25f485b7 (diff)
downloadgitlab-ce-ci-details.tar.gz
Merge branch 'master' into ci-detailsci-details
Diffstat (limited to 'app/controllers/projects_controller.rb')
-rw-r--r--app/controllers/projects_controller.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 82119022cf9..05c7d3de8bc 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -124,11 +124,7 @@ class ProjectsController < ApplicationController
::Projects::DestroyService.new(@project, current_user, {}).execute
flash[:alert] = "Project '#{@project.name}' was deleted."
- if request.referer.include?('/admin')
- redirect_to admin_namespaces_projects_path
- else
- redirect_to dashboard_projects_path
- end
+ redirect_back_or_default(default: dashboard_projects_path, options: {})
rescue Projects::DestroyService::DestroyError => ex
redirect_to edit_project_path(@project), alert: ex.message
end