mirror of
https://github.com/redmine/redmine.git
synced 2025-11-13 16:56:00 +01:00
Redirect_to project_path after WikisController#destroy (#35610).
* Project settings 'wiki' tab is removed by r16917 & r17017. * This action is executed outside the project settings scope after r16916, thus we can better redirect to project_path. Patch by Mischa The Evil. git-svn-id: http://svn.redmine.org/redmine/trunk@21087 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -25,7 +25,7 @@ class WikisController < ApplicationController
|
|||||||
def destroy
|
def destroy
|
||||||
if request.post? && params[:confirm] && @project.wiki
|
if request.post? && params[:confirm] && @project.wiki
|
||||||
@project.wiki.destroy
|
@project.wiki.destroy
|
||||||
redirect_to settings_project_path(@project, :tab => 'wiki')
|
redirect_to project_path(@project)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class WikisControllerTest < Redmine::ControllerTest
|
|||||||
@request.session[:user_id] = 1
|
@request.session[:user_id] = 1
|
||||||
post :destroy, :params => {:id => 1, :confirm => 1}
|
post :destroy, :params => {:id => 1, :confirm => 1}
|
||||||
assert_redirected_to :controller => 'projects',
|
assert_redirected_to :controller => 'projects',
|
||||||
:action => 'settings', :id => 'ecookbook', :tab => 'wiki'
|
:action => 'show', :id => 'ecookbook'
|
||||||
assert_nil Project.find(1).wiki
|
assert_nil Project.find(1).wiki
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user