]> source.dussan.org Git - redmine.git/commitdiff
Flash messages on CustomFields destroy (#24801).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 2 Mar 2017 19:41:00 +0000 (19:41 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 2 Mar 2017 19:41:00 +0000 (19:41 +0000)
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

index 71e4394f51969a91c06350568ae1ef3781232db1..232583bae0003bfbff0cb81d28ae33a3781e9951 100644 (file)
@@ -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