##// END OF EJS Templates
remove trailing white-spaces from config/routes.rb....
Toshi MARUYAMA -
r6340:11dd4eb59158
parent child
Show More
@@ -1,16 +1,16
1 ActionController::Routing::Routes.draw do |map|
1 ActionController::Routing::Routes.draw do |map|
2 # Add your own custom routes here.
2 # Add your own custom routes here.
3 # The priority is based upon order of creation: first created -> highest priority.
3 # The priority is based upon order of creation: first created -> highest priority.
4
4
5 # Here's a sample route:
5 # Here's a sample route:
6 # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
6 # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
7 # Keep in mind you can assign values other than :controller and :action
7 # Keep in mind you can assign values other than :controller and :action
8
8
9 map.home '', :controller => 'welcome'
9 map.home '', :controller => 'welcome'
10
10
11 map.signin 'login', :controller => 'account', :action => 'login'
11 map.signin 'login', :controller => 'account', :action => 'login'
12 map.signout 'logout', :controller => 'account', :action => 'logout'
12 map.signout 'logout', :controller => 'account', :action => 'logout'
13
13
14 map.connect 'roles/workflow/:id/:role_id/:tracker_id', :controller => 'roles', :action => 'workflow'
14 map.connect 'roles/workflow/:id/:role_id/:tracker_id', :controller => 'roles', :action => 'workflow'
15 map.connect 'help/:ctrl/:page', :controller => 'help'
15 map.connect 'help/:ctrl/:page', :controller => 'help'
16
16
@@ -31,11 +31,11 ActionController::Routing::Routes.draw do |map|
31 :controller => 'context_menus', :action => 'time_entries'
31 :controller => 'context_menus', :action => 'time_entries'
32 # TODO: wasteful since this is also nested under issues, projects, and projects/issues
32 # TODO: wasteful since this is also nested under issues, projects, and projects/issues
33 map.resources :time_entries, :controller => 'timelog'
33 map.resources :time_entries, :controller => 'timelog'
34
34
35 map.connect 'projects/:id/wiki', :controller => 'wikis', :action => 'edit', :conditions => {:method => :post}
35 map.connect 'projects/:id/wiki', :controller => 'wikis', :action => 'edit', :conditions => {:method => :post}
36 map.connect 'projects/:id/wiki/destroy', :controller => 'wikis', :action => 'destroy', :conditions => {:method => :get}
36 map.connect 'projects/:id/wiki/destroy', :controller => 'wikis', :action => 'destroy', :conditions => {:method => :get}
37 map.connect 'projects/:id/wiki/destroy', :controller => 'wikis', :action => 'destroy', :conditions => {:method => :post}
37 map.connect 'projects/:id/wiki/destroy', :controller => 'wikis', :action => 'destroy', :conditions => {:method => :post}
38
38
39 map.with_options :controller => 'messages' do |messages_routes|
39 map.with_options :controller => 'messages' do |messages_routes|
40 messages_routes.with_options :conditions => {:method => :get} do |messages_views|
40 messages_routes.with_options :conditions => {:method => :get} do |messages_views|
41 messages_views.connect 'boards/:board_id/topics/new', :action => 'new'
41 messages_views.connect 'boards/:board_id/topics/new', :action => 'new'
@@ -48,7 +48,7 ActionController::Routing::Routes.draw do |map|
48 messages_actions.connect 'boards/:board_id/topics/:id/:action', :action => /edit|destroy/
48 messages_actions.connect 'boards/:board_id/topics/:id/:action', :action => /edit|destroy/
49 end
49 end
50 end
50 end
51
51
52 map.with_options :controller => 'boards' do |board_routes|
52 map.with_options :controller => 'boards' do |board_routes|
53 board_routes.with_options :conditions => {:method => :get} do |board_views|
53 board_routes.with_options :conditions => {:method => :get} do |board_views|
54 board_views.connect 'projects/:project_id/boards', :action => 'index'
54 board_views.connect 'projects/:project_id/boards', :action => 'index'
@@ -62,7 +62,7 ActionController::Routing::Routes.draw do |map|
62 board_actions.connect 'projects/:project_id/boards/:id/:action', :action => /edit|destroy/
62 board_actions.connect 'projects/:project_id/boards/:id/:action', :action => /edit|destroy/
63 end
63 end
64 end
64 end
65
65
66 map.with_options :controller => 'documents' do |document_routes|
66 map.with_options :controller => 'documents' do |document_routes|
67 document_routes.with_options :conditions => {:method => :get} do |document_views|
67 document_routes.with_options :conditions => {:method => :get} do |document_views|
68 document_views.connect 'projects/:project_id/documents', :action => 'index'
68 document_views.connect 'projects/:project_id/documents', :action => 'index'
@@ -94,7 +94,7 ActionController::Routing::Routes.draw do |map|
94 gantts_routes.connect '/projects/:project_id/issues/gantt.:format'
94 gantts_routes.connect '/projects/:project_id/issues/gantt.:format'
95 gantts_routes.connect '/issues/gantt.:format'
95 gantts_routes.connect '/issues/gantt.:format'
96 end
96 end
97
97
98 map.with_options :controller => 'calendars', :action => 'show' do |calendars_routes|
98 map.with_options :controller => 'calendars', :action => 'show' do |calendars_routes|
99 calendars_routes.connect '/projects/:project_id/issues/calendar'
99 calendars_routes.connect '/projects/:project_id/issues/calendar'
100 calendars_routes.connect '/issues/calendar'
100 calendars_routes.connect '/issues/calendar'
@@ -108,12 +108,12 ActionController::Routing::Routes.draw do |map|
108 # Following two routes conflict with the resources because #index allows POST
108 # Following two routes conflict with the resources because #index allows POST
109 map.connect '/issues', :controller => 'issues', :action => 'index', :conditions => { :method => :post }
109 map.connect '/issues', :controller => 'issues', :action => 'index', :conditions => { :method => :post }
110 map.connect '/issues/create', :controller => 'issues', :action => 'index', :conditions => { :method => :post }
110 map.connect '/issues/create', :controller => 'issues', :action => 'index', :conditions => { :method => :post }
111
111
112 map.resources :issues, :member => { :edit => :post }, :collection => {} do |issues|
112 map.resources :issues, :member => { :edit => :post }, :collection => {} do |issues|
113 issues.resources :time_entries, :controller => 'timelog'
113 issues.resources :time_entries, :controller => 'timelog'
114 issues.resources :relations, :shallow => true, :controller => 'issue_relations', :only => [:index, :show, :create, :destroy]
114 issues.resources :relations, :shallow => true, :controller => 'issue_relations', :only => [:index, :show, :create, :destroy]
115 end
115 end
116
116
117 map.resources :issues, :path_prefix => '/projects/:project_id', :collection => { :create => :post } do |issues|
117 map.resources :issues, :path_prefix => '/projects/:project_id', :collection => { :create => :post } do |issues|
118 issues.resources :time_entries, :controller => 'timelog'
118 issues.resources :time_entries, :controller => 'timelog'
119 end
119 end
@@ -122,7 +122,7 ActionController::Routing::Routes.draw do |map|
122
122
123 map.with_options :controller => 'users' do |users|
123 map.with_options :controller => 'users' do |users|
124 users.connect 'users/:id/edit/:tab', :action => 'edit', :tab => nil, :conditions => {:method => :get}
124 users.connect 'users/:id/edit/:tab', :action => 'edit', :tab => nil, :conditions => {:method => :get}
125
125
126 users.with_options :conditions => {:method => :post} do |user_actions|
126 users.with_options :conditions => {:method => :post} do |user_actions|
127 user_actions.connect 'users/:id/memberships', :action => 'edit_membership'
127 user_actions.connect 'users/:id/memberships', :action => 'edit_membership'
128 user_actions.connect 'users/:id/memberships/:membership_id', :action => 'edit_membership'
128 user_actions.connect 'users/:id/memberships/:membership_id', :action => 'edit_membership'
@@ -185,7 +185,7 ActionController::Routing::Routes.draw do |map|
185 project_views.connect 'projects/:project_id/issues/:copy_from/copy', :controller => 'issues', :action => 'new'
185 project_views.connect 'projects/:project_id/issues/:copy_from/copy', :controller => 'issues', :action => 'new'
186 end
186 end
187 end
187 end
188
188
189 map.with_options :controller => 'activities', :action => 'index', :conditions => {:method => :get} do |activity|
189 map.with_options :controller => 'activities', :action => 'index', :conditions => {:method => :get} do |activity|
190 activity.connect 'projects/:id/activity'
190 activity.connect 'projects/:id/activity'
191 activity.connect 'projects/:id/activity.:format'
191 activity.connect 'projects/:id/activity.:format'
@@ -193,11 +193,10 ActionController::Routing::Routes.draw do |map|
193 activity.connect 'activity.:format', :id => nil
193 activity.connect 'activity.:format', :id => nil
194 end
194 end
195
195
196
197 map.with_options :controller => 'issue_categories' do |categories|
196 map.with_options :controller => 'issue_categories' do |categories|
198 categories.connect 'projects/:project_id/issue_categories/new', :action => 'new'
197 categories.connect 'projects/:project_id/issue_categories/new', :action => 'new'
199 end
198 end
200
199
201 map.with_options :controller => 'repositories' do |repositories|
200 map.with_options :controller => 'repositories' do |repositories|
202 repositories.with_options :conditions => {:method => :get} do |repository_views|
201 repositories.with_options :conditions => {:method => :get} do |repository_views|
203 repository_views.connect 'projects/:id/repository', :action => 'show'
202 repository_views.connect 'projects/:id/repository', :action => 'show'
@@ -215,17 +214,17 ActionController::Routing::Routes.draw do |map|
215 repository_views.connect 'projects/:id/repository/entry/*path', :action => 'entry'
214 repository_views.connect 'projects/:id/repository/entry/*path', :action => 'entry'
216 repository_views.connect 'projects/:id/repository/:action/*path'
215 repository_views.connect 'projects/:id/repository/:action/*path'
217 end
216 end
218
217
219 repositories.connect 'projects/:id/repository/:action', :conditions => {:method => :post}
218 repositories.connect 'projects/:id/repository/:action', :conditions => {:method => :post}
220 end
219 end
221
220
222 map.connect 'attachments/:id', :controller => 'attachments', :action => 'show', :id => /\d+/
221 map.connect 'attachments/:id', :controller => 'attachments', :action => 'show', :id => /\d+/
223 map.connect 'attachments/:id.:format', :controller => 'attachments', :action => 'show', :id => /\d+/
222 map.connect 'attachments/:id.:format', :controller => 'attachments', :action => 'show', :id => /\d+/
224 map.connect 'attachments/:id/:filename', :controller => 'attachments', :action => 'show', :id => /\d+/, :filename => /.*/
223 map.connect 'attachments/:id/:filename', :controller => 'attachments', :action => 'show', :id => /\d+/, :filename => /.*/
225 map.connect 'attachments/download/:id/:filename', :controller => 'attachments', :action => 'download', :id => /\d+/, :filename => /.*/
224 map.connect 'attachments/download/:id/:filename', :controller => 'attachments', :action => 'download', :id => /\d+/, :filename => /.*/
226
225
227 map.resources :groups
226 map.resources :groups
228
227
229 #left old routes at the bottom for backwards compat
228 #left old routes at the bottom for backwards compat
230 map.connect 'projects/:project_id/queries/:action', :controller => 'queries'
229 map.connect 'projects/:project_id/queries/:action', :controller => 'queries'
231 map.connect 'projects/:project_id/issues/:action', :controller => 'issues'
230 map.connect 'projects/:project_id/issues/:action', :controller => 'issues'
@@ -233,7 +232,7 ActionController::Routing::Routes.draw do |map|
233 map.connect 'projects/:project_id/boards/:action/:id', :controller => 'boards'
232 map.connect 'projects/:project_id/boards/:action/:id', :controller => 'boards'
234 map.connect 'boards/:board_id/topics/:action/:id', :controller => 'messages'
233 map.connect 'boards/:board_id/topics/:action/:id', :controller => 'messages'
235 map.connect 'wiki/:id/:page/:action', :page => nil, :controller => 'wiki'
234 map.connect 'wiki/:id/:page/:action', :page => nil, :controller => 'wiki'
236 map.connect 'projects/:project_id/news/:action', :controller => 'news'
235 map.connect 'projects/:project_id/news/:action', :controller => 'news'
237 map.connect 'projects/:project_id/timelog/:action/:id', :controller => 'timelog', :project_id => /.+/
236 map.connect 'projects/:project_id/timelog/:action/:id', :controller => 'timelog', :project_id => /.+/
238 map.with_options :controller => 'repositories' do |omap|
237 map.with_options :controller => 'repositories' do |omap|
239 omap.repositories_show 'repositories/browse/:id/*path', :action => 'browse'
238 omap.repositories_show 'repositories/browse/:id/*path', :action => 'browse'
@@ -243,12 +242,12 ActionController::Routing::Routes.draw do |map|
243 omap.repositories_entry 'repositories/annotate/:id/*path', :action => 'annotate'
242 omap.repositories_entry 'repositories/annotate/:id/*path', :action => 'annotate'
244 omap.connect 'repositories/revision/:id/:rev', :action => 'revision'
243 omap.connect 'repositories/revision/:id/:rev', :action => 'revision'
245 end
244 end
246
245
247 map.with_options :controller => 'sys' do |sys|
246 map.with_options :controller => 'sys' do |sys|
248 sys.connect 'sys/projects.:format', :action => 'projects', :conditions => {:method => :get}
247 sys.connect 'sys/projects.:format', :action => 'projects', :conditions => {:method => :get}
249 sys.connect 'sys/projects/:id/repository.:format', :action => 'create_project_repository', :conditions => {:method => :post}
248 sys.connect 'sys/projects/:id/repository.:format', :action => 'create_project_repository', :conditions => {:method => :post}
250 end
249 end
251
250
252 # Install the default route as the lowest priority.
251 # Install the default route as the lowest priority.
253 map.connect ':controller/:action/:id'
252 map.connect ':controller/:action/:id'
254 map.connect 'robots.txt', :controller => 'welcome', :action => 'robots'
253 map.connect 'robots.txt', :controller => 'welcome', :action => 'robots'
General Comments 0
You need to be logged in to leave comments. Login now