summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-11 11:22:33 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-11 11:22:33 +0300
commit78ec7d9c9d156fe556d165c1c096bf5534d62d25 (patch)
tree8c507f0a7e40189c40e484ad99bccfe0af8fbc1a
parent745f262c1634aed65cc3f225a36b53d38e32be41 (diff)
parent17fd28468eaca3b5930640a0ad42e8a5f18f29bd (diff)
downloadgitlab-ce-78ec7d9c9d156fe556d165c1c096bf5534d62d25.tar.gz
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce
-rw-r--r--app/controllers/projects_controller.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index f23afaf28fa..b3380a6ff23 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -103,7 +103,15 @@ class ProjectsController < ApplicationController
::Projects::DestroyService.new(@project, current_user, {}).execute
respond_to do |format|
- format.html { redirect_to root_path }
+ format.html do
+ flash[:alert] = "Project deleted."
+
+ if request.referer.include?("/admin")
+ redirect_to admin_projects_path
+ else
+ redirect_to projects_dashboard_path
+ end
+ end
end
end