Few improvements to wiki module.

This commit is contained in:
Benjamin Meichsner 2009-05-07 18:15:14 +02:00
parent dafbb077b6
commit 7e4409bc11
6 changed files with 17 additions and 7 deletions

View file

@ -41,8 +41,8 @@ class PagesController < ApplicationController
respond_to do |format|
if @page.save
flash[:notice] = 'Page was successfully created.'
format.html { redirect_to(@page) }
flash[:notice] = 'Seite wurde angelegt.'
format.html { redirect_to(wiki_page_path(@page.permalink)) }
format.xml { render :xml => @page, :status => :created, :location => @page }
else
format.html { render :action => "new" }
@ -58,8 +58,8 @@ class PagesController < ApplicationController
respond_to do |format|
if @page.update_attributes(params[:page])
flash[:notice] = 'Page was successfully updated.'
format.html { redirect_to(@page) }
flash[:notice] = 'Seite wurde aktualisiert.'
format.html { redirect_to(wiki_page_path(@page.permalink)) }
format.xml { head :ok }
else
format.html { render :action => "edit" }