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:
authorJames Lopez <james@jameslopez.es>2016-12-21 13:50:31 +0300
committerJames Lopez <james@jameslopez.es>2016-12-21 13:50:31 +0300
commitfd5062a848d63b89248c384e0171c6f1af833a49 (patch)
tree327d3be3dbe1305dbd98833b523df66d128b400f /app/controllers/groups_controller.rb
parentb82fdf6257255b720526ccef716759892e88de09 (diff)
update controller action to render error in form
Diffstat (limited to 'app/controllers/groups_controller.rb')
-rw-r--r--app/controllers/groups_controller.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb
index 5c7709ea013..b83c3a872cf 100644
--- a/app/controllers/groups_controller.rb
+++ b/app/controllers/groups_controller.rb
@@ -82,10 +82,7 @@ class GroupsController < Groups::ApplicationController
if Groups::UpdateService.new(@group, current_user, group_params).execute
redirect_to edit_group_path(@group), notice: "Group '#{@group.name}' was successfully updated."
else
- error = group.errors.full_messages.first
- alert_message = "Group '#{@group.name}' cannot be updated: " + error
-
- redirect_to edit_group_path(@group.reload), alert: alert_message
+ render action: "edit"
end
end