Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/groups/labels_controller.rb')
-rw-r--r--app/controllers/groups/labels_controller.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/controllers/groups/labels_controller.rb b/app/controllers/groups/labels_controller.rb
index 2d821676677..57bca5ebc52 100644
--- a/app/controllers/groups/labels_controller.rb
+++ b/app/controllers/groups/labels_controller.rb
@@ -64,8 +64,13 @@ class Groups::LabelsController < Groups::ApplicationController
end
def destroy
- @label.destroy
- redirect_to group_labels_path(@group), status: :found, notice: "#{@label.name} deleted permanently"
+ if @label.destroy
+ redirect_to group_labels_path(@group), status: :found,
+ notice: format(_('%{label_name} was removed'), label_name: @label.name)
+ else
+ redirect_to group_labels_path(@group), status: :found,
+ alert: @label.errors.full_messages.to_sentence
+ end
end
protected