1
|
ActionController::Routing::Routes.draw do |map|
|
2
|
# Add your own custom routes here.
|
3
|
# The priority is based upon order of creation: first created -> highest priority.
|
4
|
|
5
|
# Here's a sample route:
|
6
|
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
|
7
|
# Keep in mind you can assign values other than :controller and :action
|
8
|
|
9
|
map.home '', :controller => 'welcome'
|
10
|
|
11
|
map.connect 'wiki/:id/:page/:action', :controller => 'wiki', :page => nil
|
12
|
map.connect 'roles/workflow/:id/:role_id/:tracker_id', :controller => 'roles', :action => 'workflow'
|
13
|
map.connect 'help/:ctrl/:page', :controller => 'help'
|
14
|
#map.connect ':controller/:action/:id/:sort_key/:sort_order'
|
15
|
|
16
|
map.connect 'issues/:issue_id/relations/:action/:id', :controller => 'issue_relations'
|
17
|
map.connect 'projects/:project_id/issues/:action', :controller => 'issues'
|
18
|
map.connect 'projects/:project_id/news/:action', :controller => 'news'
|
19
|
map.connect 'projects/:project_id/boards/:action/:id', :controller => 'boards'
|
20
|
map.connect 'boards/:board_id/topics/:action/:id', :controller => 'messages'
|
21
|
|
22
|
map.with_options :controller => 'repositories' do |omap|
|
23
|
omap.repositories_show 'repositories/browse/:id/*path', :action => 'browse'
|
24
|
omap.repositories_changes 'repositories/changes/:id/*path', :action => 'changes'
|
25
|
omap.repositories_diff 'repositories/diff/:id/*path', :action => 'diff'
|
26
|
omap.repositories_entry 'repositories/entry/:id/*path', :action => 'entry'
|
27
|
omap.repositories_entry 'repositories/annotate/:id/*path', :action => 'annotate'
|
28
|
end
|
29
|
|
30
|
# Allow downloading Web Service WSDL as a file with an extension
|
31
|
# instead of a file named 'wsdl'
|
32
|
map.connect ':controller/service.wsdl', :action => 'wsdl'
|
33
|
|
34
|
|
35
|
# Install the default route as the lowest priority.
|
36
|
map.connect ':controller/:action/:id'
|
37
|
end
|