From ffbc66cc0bb62b962779aea4d4b0c06dcf12078e Mon Sep 17 00:00:00 2001 From: Illya Klymov Date: Tue, 2 Apr 2019 04:14:19 +0300 Subject: Redirect to edit page on group transfer failure --- app/controllers/groups_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/controllers/groups_controller.rb') diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index 0192b1c253e..87b8ef03313 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -124,8 +124,8 @@ class GroupsController < Groups::ApplicationController flash[:notice] = "Group '#{@group.name}' was successfully transferred." redirect_to group_path(@group) else - flash.now[:alert] = service.error - render :edit + flash[:alert] = service.error + redirect_to edit_group_path(@group) end end # rubocop: enable CodeReuse/ActiveRecord -- cgit v1.2.3