summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-12-30 14:55:05 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-12-30 14:55:05 +0000
commit561f7090c8c93ddf3924e324b6d2e6b81c57abb8 (patch)
treed698485623cdee95d542150b2e249475c38bb786
parentdbc78746d25db449ba7b2cb947247ac284e0672b (diff)
downloadredmine-561f7090c8c93ddf3924e324b6d2e6b81c57abb8.tar.gz
redmine-561f7090c8c93ddf3924e324b6d2e6b81c57abb8.zip
route: change order of some issues and projects resources and matchings
This change passes issues and projects routing tests on Rails 3.0. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8441 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--config/routes.rb36
1 files changed, 18 insertions, 18 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 70fb0fdd9..034b0ddd2 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -109,18 +109,6 @@ ActionController::Routing::Routes.draw do |map|
map.connect 'my/order_blocks', :controller => 'my', :action => 'order_blocks',
:conditions => {:method => :post}
- map.resources :issues,
- :collection => {:bulk_edit => :get, :bulk_update => :post} do |issues|
- issues.resources :time_entries, :controller => 'timelog',
- :collection => {:report => :get}
- issues.resources :relations, :shallow => true,
- :controller => 'issue_relations',
- :only => [:index, :show, :create, :destroy]
- end
- # Bulk deletion
- map.connect '/issues', :controller => 'issues', :action => 'destroy',
- :conditions => {:method => :delete}
-
map.connect 'projects/:id/members/new', :controller => 'members',
:action => 'new', :conditions => { :method => :post }
map.connect 'members/edit/:id', :controller => 'members',
@@ -163,6 +151,14 @@ ActionController::Routing::Routes.draw do |map|
map.connect 'watchers/unwatch', :controller=> 'watchers', :action => 'unwatch',
:conditions => {:method => :post}
+ # TODO: port to be part of the resources route(s)
+ map.with_options :conditions => {:method => :get} do |project_views|
+ project_views.connect 'projects/:id/settings/:tab',
+ :controller => 'projects', :action => 'settings'
+ project_views.connect 'projects/:project_id/issues/:copy_from/copy',
+ :controller => 'issues', :action => 'new'
+ end
+
map.resources :projects, :member => {
:copy => [:get, :post],
:settings => :get,
@@ -208,13 +204,17 @@ ActionController::Routing::Routes.draw do |map|
end
- # TODO: port to be part of the resources route(s)
- map.with_options :conditions => {:method => :get} do |project_views|
- project_views.connect 'projects/:id/settings/:tab',
- :controller => 'projects', :action => 'settings'
- project_views.connect 'projects/:project_id/issues/:copy_from/copy',
- :controller => 'issues', :action => 'new'
+ map.resources :issues,
+ :collection => {:bulk_edit => :get, :bulk_update => :post} do |issues|
+ issues.resources :time_entries, :controller => 'timelog',
+ :collection => {:report => :get}
+ issues.resources :relations, :shallow => true,
+ :controller => 'issue_relations',
+ :only => [:index, :show, :create, :destroy]
end
+ # Bulk deletion
+ map.connect '/issues', :controller => 'issues', :action => 'destroy',
+ :conditions => {:method => :delete}
map.with_options :controller => 'activities', :action => 'index',
:conditions => {:method => :get} do |activity|