Redirect to edit page on group transfer failure
This commit is contained in:
parent
a374d690e7
commit
ffbc66cc0b
|
@ -124,8 +124,8 @@ class GroupsController < Groups::ApplicationController
|
||||||
flash[:notice] = "Group '#{@group.name}' was successfully transferred."
|
flash[:notice] = "Group '#{@group.name}' was successfully transferred."
|
||||||
redirect_to group_path(@group)
|
redirect_to group_path(@group)
|
||||||
else
|
else
|
||||||
flash.now[:alert] = service.error
|
flash[:alert] = service.error
|
||||||
render :edit
|
redirect_to edit_group_path(@group)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# rubocop: enable CodeReuse/ActiveRecord
|
# rubocop: enable CodeReuse/ActiveRecord
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Group transfer now properly redirects to edit on failure
|
||||||
|
merge_request: 26837
|
||||||
|
author:
|
||||||
|
type: fixed
|
|
@ -616,7 +616,7 @@ describe GroupsController do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should redirect to the current path' do
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue