summaryrefslogtreecommitdiff
path: root/app/controllers/projects_controller.rb
diff options
context:
space:
mode:
authorKevin Boyd <kboyd@perforce.com>2014-09-05 22:35:46 +0000
committerKevin Boyd <kboyd@perforce.com>2014-09-05 22:35:46 +0000
commit893bd8aceca731ebe3124cebe6c7a09adc17b971 (patch)
treea25072809b0ac9cd3bffeea8be5d9e9ce1439af6 /app/controllers/projects_controller.rb
parent75b0ef82ba81ae6892cb14756fee2500b8b2d56f (diff)
downloadgitlab-ce-893bd8aceca731ebe3124cebe6c7a09adc17b971.tar.gz
Incorporating Dmitriy's referrer-based routing suggestion
Diffstat (limited to 'app/controllers/projects_controller.rb')
-rw-r--r--app/controllers/projects_controller.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 42f3d901eab..b3380a6ff23 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -105,7 +105,12 @@ class ProjectsController < ApplicationController
respond_to do |format|
format.html do
flash[:alert] = "Project deleted."
- redirect_to admin_projects_path
+
+ if request.referer.include?("/admin")
+ redirect_to admin_projects_path
+ else
+ redirect_to projects_dashboard_path
+ end
end
end
end