Incorporating Dmitriy's referrer-based routing suggestion

This commit is contained in:
Kevin Boyd 2014-09-05 22:35:46 +00:00
parent 75b0ef82ba
commit 893bd8acec

View file

@ -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