提交 ffbc66cc 编写于 作者: I Illya Klymov

Redirect to edit page on group transfer failure

上级 a374d690
......@@ -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
......
---
title: Group transfer now properly redirects to edit on failure
merge_request: 26837
author:
type: fixed
......@@ -616,7 +616,7 @@ describe GroupsController do
end
it 'should redirect to the current path' do
expect(response).to render_template(:edit)
expect(response).to redirect_to(edit_group_path(group))
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册