summaryrefslogtreecommitdiff
path: root/config/routes.rb
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-10-07 23:36:03 +0200
committerhukl <contact@smyck.org>2009-10-07 23:36:03 +0200
commit262f4e0c2abfefbd6965358fdfd9a8c332a38d57 (patch)
tree91055edbbbec337ffd8745239b9d3ccdd8aebb9a /config/routes.rb
parentd3271f55b56e0fb5f73cf5691f90be9370d85d80 (diff)
refactored revsions controller to act as a nested resource of nodes. boy that cleaned up some stuff quite a bit. also having tests for that is just feeling great
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/config/routes.rb b/config/routes.rb
index d591619..9b5980b 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -12,9 +12,10 @@ ActionController::Routing::Routes.draw do |map|
12 map.resources :tags 12 map.resources :tags
13 map.resources :occurrences 13 map.resources :occurrences
14 map.resources :events 14 map.resources :events
15 map.resources :revisions, :member => {:diff => :post, :restore => :put}
16 map.resources :pages, :member => {:preview => :get, :sort_images => :put} 15 map.resources :pages, :member => {:preview => :get, :sort_images => :put}
17 map.resources :nodes, :member => {:publish => :put, :unlock => :put} 16 map.resources :nodes, :member => {:publish => :put, :unlock => :put} do |node|
17 node.resources :revisions, :member => {:restore => :put}, :collection => {:diff => :post}
18 end
18 map.logout '/logout', :controller => 'sessions', :action => 'destroy' 19 map.logout '/logout', :controller => 'sessions', :action => 'destroy'
19 map.login '/login', :controller => 'sessions', :action => 'new' 20 map.login '/login', :controller => 'sessions', :action => 'new'
20 map.admin_search 'admin/search', :controller => 'admin', :action => 'search' 21 map.admin_search 'admin/search', :controller => 'admin', :action => 'search'