]> source.dussan.org Git - redmine.git/commitdiff
Redirect_to project_path after WikisController#destroy (#35610).
authorMarius Balteanu <marius.balteanu@zitec.com>
Mon, 26 Jul 2021 21:27:23 +0000 (21:27 +0000)
committerMarius Balteanu <marius.balteanu@zitec.com>
Mon, 26 Jul 2021 21:27:23 +0000 (21:27 +0000)
* 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

app/controllers/wikis_controller.rb
test/functional/wikis_controller_test.rb

index 5c6c54e5577d5439ec4274af28f9606eb5861f00..2cc8c2f042a6ec0529f3246e22e5485d4f88273f 100644 (file)
@@ -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
index 6eef2061a0d65811241e08a03f79999c4056e261..be61c827711c0d42c0453e2a9eb83629d93fd84a 100644 (file)
@@ -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