diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-12-27 11:08:22 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-12-27 11:08:22 +0000 |
commit | ac51ab12f08a8877861a1fc0bf69b73f48a4b44e (patch) | |
tree | 76bc53fb9e822a83d76725a93b5feb5cde35d234 /config/routes.rb | |
parent | 50d320a35ecb2b3d08df8092bc10b0f4a4216e26 (diff) | |
download | redmine-ac51ab12f08a8877861a1fc0bf69b73f48a4b44e.tar.gz redmine-ac51ab12f08a8877861a1fc0bf69b73f48a4b44e.zip |
route: code layout clean up repository route
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8403 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'config/routes.rb')
-rw-r--r-- | config/routes.rb | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/config/routes.rb b/config/routes.rb index ede101e31..260430cb1 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -211,13 +211,17 @@ ActionController::Routing::Routes.draw do |map| repository_views.connect 'projects/:id/repository', :action => 'show' repository_views.connect 'projects/:id/repository/edit', :action => 'edit' repository_views.connect 'projects/:id/repository/statistics', :action => 'stats' + repository_views.connect 'projects/:id/repository/revisions', :action => 'revisions' repository_views.connect 'projects/:id/repository/revisions.:format', :action => 'revisions' repository_views.connect 'projects/:id/repository/revisions/:rev', :action => 'revision' repository_views.connect 'projects/:id/repository/revisions/:rev/diff', :action => 'diff' repository_views.connect 'projects/:id/repository/revisions/:rev/diff.:format', :action => 'diff' - repository_views.connect 'projects/:id/repository/revisions/:rev/raw/*path', :action => 'entry', :format => 'raw', :requirements => { :rev => /[a-z0-9\.\-_]+/ } - repository_views.connect 'projects/:id/repository/revisions/:rev/:action/*path', :requirements => { :rev => /[a-z0-9\.\-_]+/ } + repository_views.connect 'projects/:id/repository/revisions/:rev/raw/*path', :action => 'entry', + :format => 'raw', :requirements => { :rev => /[a-z0-9\.\-_]+/ } + repository_views.connect 'projects/:id/repository/revisions/:rev/:action/*path', + :requirements => { :rev => /[a-z0-9\.\-_]+/ } + repository_views.connect 'projects/:id/repository/raw/*path', :action => 'entry', :format => 'raw' repository_views.connect 'projects/:id/repository/browse/*path', :action => 'browse' repository_views.connect 'projects/:id/repository/entry/*path', :action => 'entry' @@ -228,10 +232,15 @@ ActionController::Routing::Routes.draw do |map| repository_views.connect 'projects/:id/repository/graph', :action => 'graph' end - repositories.connect 'projects/:id/repository/revision', :action => 'revision', :conditions => {:method => [:get, :post]} - repositories.connect 'projects/:id/repository/committers', :action => 'committers', :conditions => {:method => [:get, :post]} - repositories.connect 'projects/:id/repository/edit', :action => 'edit', :conditions => {:method => :post} - repositories.connect 'projects/:id/repository/destroy', :action => 'destroy', :conditions => {:method => :post} + repositories.connect 'projects/:id/repository/revision', :action => 'revision', + :conditions => {:method => [:get, :post]} + + repositories.connect 'projects/:id/repository/committers', :action => 'committers', + :conditions => {:method => [:get, :post]} + repositories.connect 'projects/:id/repository/edit', :action => 'edit', + :conditions => {:method => :post} + repositories.connect 'projects/:id/repository/destroy', :action => 'destroy', + :conditions => {:method => :post} end map.resources :attachments, :only => [:show, :destroy] |