summaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-03-02 19:41:00 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-03-02 19:41:00 +0000
commit125d8e26b6e8c6ee3dd01e6b928dbdef754303db (patch)
tree4340f7b3ab2a2399a96d1f166952ef083f183fb8 /app/controllers
parent7741263ab605189c7728cf79d89a150b4bf4b27b (diff)
downloadredmine-125d8e26b6e8c6ee3dd01e6b928dbdef754303db.tar.gz
redmine-125d8e26b6e8c6ee3dd01e6b928dbdef754303db.zip
Flash messages on CustomFields destroy (#24801).
Patch by Javier Menéndez. git-svn-id: http://svn.redmine.org/redmine/trunk@16348 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/custom_fields_controller.rb4
1 files changed, 3 insertions, 1 deletions
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