1 ActionController::Routing::Routes.draw do |map|
4 API_VERSION = '0.4' # change this in envronment.rb too
5 map.connect "api/#{API_VERSION}/node/create", :controller => 'node', :action => 'create'
6 map.connect "api/#{API_VERSION}/node/:id/history", :controller => 'old_node', :action => 'history', :id => nil
7 map.connect "api/#{API_VERSION}/node/:id", :controller => 'node', :action => 'rest', :id => nil
8 map.connect "api/#{API_VERSION}/nodes", :controller => 'node', :action => 'nodes', :id => nil
10 map.connect "api/#{API_VERSION}/segment/create", :controller => 'segment', :action => 'create'
11 map.connect "api/#{API_VERSION}/segment/:id/history", :controller => 'old_segment', :action => 'history'
12 map.connect "api/#{API_VERSION}/segment/:id", :controller => 'segment', :action => 'rest'
13 map.connect "api/#{API_VERSION}/segments", :controller => 'segment', :action => 'segments', :id => nil
15 map.connect "api/#{API_VERSION}/way/create", :controller => 'way', :action => 'create'
16 map.connect "api/#{API_VERSION}/way/:id/history", :controller => 'old_way', :action => 'history', :id => nil
17 map.connect "api/#{API_VERSION}/way/:id", :controller => 'way', :action => 'rest', :id => nil
18 map.connect "api/#{API_VERSION}/ways", :controller => 'way', :action => 'ways', :id => nil
20 map.connect "api/#{API_VERSION}/map", :controller => 'api', :action => 'map'
24 map.connect '/', :controller => 'site', :action => 'index'
25 map.connect '/index.html', :controller => 'site', :action => 'index'
26 map.connect '/edit.html', :controller => 'site', :action => 'edit'
27 map.connect '/login.html', :controller => 'user', :action => 'login'
28 map.connect '/logout.html', :controller => 'user', :action => 'logout'
29 map.connect '/create-account.html', :controller => 'user', :action => 'new'
30 map.connect '/forgot-password.html', :controller => 'user', :action => 'lost_password'
33 map.connect '/traces', :controller => 'trace', :action => 'list'
34 map.connect '/traces/page/:page', :controller => 'trace', :action => 'list'
35 map.connect '/traces/mine', :controller => 'trace', :action => 'mine'
36 map.connect '/traces/rss', :controller => 'trace', :action => 'georss'
37 map.connect '/traces/user/:display_name/', :controller => 'trace', :action => 'list', :id => nil
38 map.connect '/traces/user/:display_name/:id', :controller => 'trace', :action => 'view', :id => nil
39 map.connect '/traces/user/:display_name/:id/picture', :controller => 'trace', :action => 'picture', :id => nil
40 map.connect '/traces/user/:display_name/:id/icon', :controller => 'trace', :action => 'icon', :id => nil
41 map.connect '/traces/tag/:tag/', :controller => 'trace', :action => 'list', :id => nil
44 map.connect ':controller/:action/:id'