Added better routing for wiki-root-path.

This commit is contained in:
Benjamin Meichsner 2009-05-15 13:53:45 +02:00
parent 0d11e68bad
commit f83d2659de
2 changed files with 2 additions and 1 deletions

View file

@ -16,7 +16,7 @@
{ :name => "Aufgaben", :url => "/tasks"} { :name => "Aufgaben", :url => "/tasks"}
] ]
}, },
{ :name => "Wiki", :url => "/pages", :active => ["pages", "wiki"], { :name => "Wiki", :url => "/wiki", :active => ["pages", "wiki"],
:subnav => [ :subnav => [
{ :name => "Alle Seiten", :url => "/pages/all" } { :name => "Alle Seiten", :url => "/pages/all" }
] ]

View file

@ -1,6 +1,7 @@
ActionController::Routing::Routes.draw do |map| ActionController::Routing::Routes.draw do |map|
map.resources :pages, :collection => { :all => :get } map.resources :pages, :collection => { :all => :get }
map.wiki_page "/wiki/:permalink", :controller => 'pages', :action => 'show' map.wiki_page "/wiki/:permalink", :controller => 'pages', :action => 'show'
map.wiki "/wiki", :controller => 'pages', :action => 'show', :permalink => 'home'
map.logout '/logout', :controller => 'login', :action => 'logout' map.logout '/logout', :controller => 'login', :action => 'logout'
map.my_profile '/home/profile', :controller => 'home', :action => 'profile' map.my_profile '/home/profile', :controller => 'home', :action => 'profile'