From 125d8e26b6e8c6ee3dd01e6b928dbdef754303db Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 2 Mar 2017 19:41:00 +0000 Subject: Flash messages on CustomFields destroy (#24801). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Javier Menéndez. git-svn-id: http://svn.redmine.org/redmine/trunk@16348 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/custom_fields_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/controllers') diff --git a/app/controllers/custom_fields_controller.rb b/app/controllers/custom_fields_controller.rb index 71e4394f5..232583bae 100644 --- a/app/controllers/custom_fields_controller.rb +++ b/app/controllers/custom_fields_controller.rb @@ -76,7 +76,9 @@ class CustomFieldsController < ApplicationController def destroy begin - @custom_field.destroy + if @custom_field.destroy + flash[:notice] = l(:notice_successful_delete) + end rescue flash[:error] = l(:error_can_not_delete_custom_field) end -- cgit v1.2.3