Defect #44377 ยป fix_redirect_groups_controller.patch
| app/controllers/groups_controller.rb | ||
|---|---|---|
| 92 | 92 |
respond_to do |format| |
| 93 | 93 |
if @group.save |
| 94 | 94 |
flash[:notice] = l(:notice_successful_update) |
| 95 |
format.html {redirect_to_referer_or(groups_path)}
|
|
| 95 |
format.html {redirect_to(edit_group_path(@group))}
|
|
| 96 | 96 |
format.api {render_api_ok}
|
| 97 | 97 |
else |
| 98 | 98 |
format.html {render :action => "edit"}
|
| ... | ... | |
| 105 | 105 |
@group.destroy |
| 106 | 106 | |
| 107 | 107 |
respond_to do |format| |
| 108 |
format.html {redirect_to_referer_or(groups_path)}
|
|
| 108 |
format.html {redirect_to(groups_path)}
|
|
| 109 | 109 |
format.api {render_api_ok}
|
| 110 | 110 |
end |
| 111 | 111 |
end |
| test/functional/groups_controller_test.rb | ||
|---|---|---|
| 180 | 180 |
} |
| 181 | 181 |
} |
| 182 | 182 |
) |
| 183 |
assert_redirected_to '/groups' |
|
| 183 |
assert_redirected_to '/groups/10/edit'
|
|
| 184 | 184 |
group = Group.find(10) |
| 185 | 185 |
assert_equal new_name, group.name |
| 186 | 186 |
end |