Project

General

Profile

Defect #44377 ยป fix_redirect_groups_controller.patch

Kenta Kumojima, 2026-08-26 09:30

View differences:

app/controllers/groups_controller.rb
respond_to do |format|
if @group.save
flash[:notice] = l(:notice_successful_update)
format.html {redirect_to_referer_or(groups_path)}
format.html {redirect_to(edit_group_path(@group))}
format.api {render_api_ok}
else
format.html {render :action => "edit"}
......
@group.destroy
respond_to do |format|
format.html {redirect_to_referer_or(groups_path)}
format.html {redirect_to(groups_path)}
format.api {render_api_ok}
end
end
test/functional/groups_controller_test.rb
}
}
)
assert_redirected_to '/groups'
assert_redirected_to '/groups/10/edit'
group = Group.find(10)
assert_equal new_name, group.name
end
    (1-1/1)