aboutsummaryrefslogtreecommitdiffstats
path: root/config/routes.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb27
1 files changed, 19 insertions, 8 deletions
diff --git a/config/routes.rb b/config/routes.rb
index be9a1f7f3..fc981702f 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -4,7 +4,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: routes.rb,v 1.12 2007-10-11 22:01:37 francis Exp $
+# $Id: routes.rb,v 1.13 2007-10-15 22:26:38 louise Exp $
ActionController::Routing::Routes.draw do |map|
# The priority is based upon order of creation: first created -> highest priority.
@@ -12,17 +12,28 @@ ActionController::Routing::Routes.draw do |map|
# Sample of regular route:
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
# Keep in mind you can assign values other than :controller and :action
- map.connect "/new/:action", :controller => 'new'
- map.connect "/list/:action", :controller => 'list'
- map.connect "/request/:id", :controller => 'request', :action => 'index'
- map.connect "/user/:name", :controller => 'user', :action => 'index'
+
+ map.with_options :controller => 'request' do |request|
+ request.connect '/', :action => 'frontpage'
+ request.connect '/list', :action => 'list'
+ request.connect '/index', :action => 'index'
+ request.connect '/new', :action => 'new'
+ request.connect '/create', :action => 'create'
+ request.connect '/request/:id', :action => 'show'
+ end
+
+ map.with_options :controller => 'user' do |user|
+ user.connect '/signin', :action => 'signin'
+ user.connect '/signup', :action => 'signup'
+ user.connect '/signout', :action => 'signout'
+ user.connect "/user/:name", :action => 'index'
+ end
+
map.connect "/body/:short_name", :controller => 'body', :action => 'show'
map.connect '/admin/:action', :controller => 'admin', :action => 'index'
map.connect '/admin/body/:action/:id', :controller => 'admin_public_body'
- map.connect "/:action/:id", :controller => 'index'
-
# Sample of named route:
# map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
# This route can be invoked with purchase_url(:id => product.id)
@@ -39,6 +50,6 @@ ActionController::Routing::Routes.draw do |map|
# FAI: Turned off for now, as to be honest I don't trust it from a security point of view.
#map.connect ':controller/:action/:id.:format'
#map.connect ':controller/:action/:id'
- map.connect '/:controller/:action'
+ # map.connect '/:controller/:action'
end