From 6eba04d30d4c5370fc18d7c44149447d00213de2 Mon Sep 17 00:00:00 2001 From: Benjamin Meichsner Date: Mon, 28 Sep 2009 16:26:53 +0200 Subject: [PATCH] Better messages and redirect when a page is deleted. --- app/controllers/pages_controller.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index a0bce16c..c7b15dda 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -88,10 +88,8 @@ class PagesController < ApplicationController @page = Page.find(params[:id]) @page.destroy - respond_to do |format| - format.html { redirect_to(pages_url) } - format.xml { head :ok } - end + flash[:notice] = "Die Seite '#{@page.title}' und alle Unterseiten wurden erfolgreich gelöscht." + redirect_to wiki_path end def all