From 75b0ef82ba81ae6892cb14756fee2500b8b2d56f Mon Sep 17 00:00:00 2001 From: Kevin Boyd Date: Fri, 29 Aug 2014 15:56:26 -0700 Subject: Fine-tune the Remove Project redirect. Now it redirects to admin_projects_path and shows a flash message confirming the action has been taken. --- app/controllers/projects_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index f23afaf28fa..42f3d901eab 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -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 -- cgit v1.2.1