Fine-tune the Remove Project redirect. Now it redirects to admin_projects_path and shows a flash message confirming the action has been taken.

This commit is contained in:
Kevin Boyd
2014-08-29 15:56:26 -07:00
parent c9054319c8
commit 75b0ef82ba
+4 -1
View File
@@ -103,7 +103,10 @@ 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."
redirect_to admin_projects_path
end
end
end