Incorporating Dmitriy's referrer-based routing suggestion
This commit is contained in:
parent
75b0ef82ba
commit
893bd8acec
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue