summaryrefslogtreecommitdiff
path: root/app/controllers/wikis_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/wikis_controller.rb')
-rw-r--r--app/controllers/wikis_controller.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/controllers/wikis_controller.rb b/app/controllers/wikis_controller.rb
index 9a1638f2e4a..544f9887258 100644
--- a/app/controllers/wikis_controller.rb
+++ b/app/controllers/wikis_controller.rb
@@ -42,11 +42,10 @@ class WikisController < ApplicationController
end
def destroy
- @wiki = @project.wikis.find(params[:id])
- @wiki.destroy
+ @wikis = @project.wikis.where(:slug => params[:id]).delete_all
respond_to do |format|
- format.html { redirect_to wikis_url }
+ format.html { redirect_to project_wiki_path(@project, :index), notice: "Page was successfully deleted" }
end
end
end