From 4cf9b836703d9c677cb155988658b9470f270307 Mon Sep 17 00:00:00 2001 From: Mischa The Evil Date: Wed, 27 Jan 2021 08:10:52 +0100 Subject: [PATCH 2/5] Redirect_to project_path after WikisController#destroy. * 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. --- app/controllers/wikis_controller.rb | 2 +- test/functional/wikis_controller_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/wikis_controller.rb b/app/controllers/wikis_controller.rb index edca739c6..b696156c3 100644 --- a/app/controllers/wikis_controller.rb +++ b/app/controllers/wikis_controller.rb @@ -25,7 +25,7 @@ class WikisController < ApplicationController def destroy if request.post? && params[:confirm] && @project.wiki @project.wiki.destroy - redirect_to settings_project_path(@project, :tab => 'wiki') + redirect_to project_path(@project) end end end diff --git a/test/functional/wikis_controller_test.rb b/test/functional/wikis_controller_test.rb index 27789b644..c593d5200 100644 --- a/test/functional/wikis_controller_test.rb +++ b/test/functional/wikis_controller_test.rb @@ -40,7 +40,7 @@ class WikisControllerTest < Redmine::ControllerTest @request.session[:user_id] = 1 post :destroy, :params => {:id => 1, :confirm => 1} assert_redirected_to :controller => 'projects', - :action => 'settings', :id => 'ecookbook', :tab => 'wiki' + :action => 'show', :id => 'ecookbook' assert_nil Project.find(1).wiki end -- 2.26.0.windows.1