summaryrefslogtreecommitdiffstats
path: root/config/routes.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-01-29 01:23:15 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-01-29 01:23:15 +0000
commitf49d8d8c5f5fe9070f911c6767997f5667f00b3a (patch)
tree477e3e9442001586d8dc949f38f45c0b604c291e /config/routes.rb
parent83e7ee6729cd0207219719556b3e2aed0a33f360 (diff)
downloadredmine-f49d8d8c5f5fe9070f911c6767997f5667f00b3a.tar.gz
redmine-f49d8d8c5f5fe9070f911c6767997f5667f00b3a.zip
route: repository: move :repository_id routes before non :repository_id routes
On Rails3 new route format, tests pass except following routes. * 'projects/:id/repository' :action => 'show' * 'projects/:id/repository/:repository_id' :action => 'show' git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8718 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb49
1 files changed, 26 insertions, 23 deletions
diff --git a/config/routes.rb b/config/routes.rb
index d905ce654..d5794c913 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -233,58 +233,61 @@ ActionController::Routing::Routes.draw do |map|
repositories.with_options :conditions => {:method => :get} do |repository_views|
repository_views.connect 'projects/:id/repository',
:action => 'show'
+
+ repository_views.connect 'projects/:id/repository/:repository_id/statistics',
+ :action => 'stats'
+ repository_views.connect 'projects/:id/repository/:repository_id/graph',
+ :action => 'graph'
+
repository_views.connect 'projects/:id/repository/statistics',
:action => 'stats'
repository_views.connect 'projects/:id/repository/graph',
:action => 'graph'
- repository_views.connect 'projects/:id/repository/revisions',
+
+ repository_views.connect 'projects/:id/repository/:repository_id/revisions',
:action => 'revisions'
- repository_views.connect 'projects/:id/repository/revisions.:format',
+ repository_views.connect 'projects/:id/repository/:repository_id/revisions.:format',
:action => 'revisions'
- repository_views.connect 'projects/:id/repository/revisions/:rev',
+ repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev',
:action => 'revision'
- repository_views.connect 'projects/:id/repository/revisions/:rev/diff',
+ repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/diff',
:action => 'diff'
- repository_views.connect 'projects/:id/repository/revisions/:rev/diff.:format',
+ repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/diff.:format',
:action => 'diff'
- repository_views.connect 'projects/:id/repository/revisions/:rev/raw/*path',
+ repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/raw/*path',
:action => 'entry', :format => 'raw'
- repository_views.connect 'projects/:id/repository/revisions/:rev/:action/*path',
+ repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/:action/*path',
:requirements => {
:action => /(browse|show|entry|changes|annotate|diff)/,
:rev => /[a-z0-9\.\-_]+/
}
- repository_views.connect 'projects/:id/repository/raw/*path',
+ repository_views.connect 'projects/:id/repository/:repository_id/raw/*path',
:action => 'entry', :format => 'raw'
- repository_views.connect 'projects/:id/repository/:action/*path',
+ repository_views.connect 'projects/:id/repository/:repository_id/:action/*path',
:requirements => { :action => /(browse|show|entry|changes|annotate|diff)/ }
- # Same routes with a repository_id
- repository_views.connect 'projects/:id/repository/:repository_id/statistics',
- :action => 'stats'
- repository_views.connect 'projects/:id/repository/:repository_id/graph',
- :action => 'graph'
- repository_views.connect 'projects/:id/repository/:repository_id/revisions',
+ repository_views.connect 'projects/:id/repository/revisions',
:action => 'revisions'
- repository_views.connect 'projects/:id/repository/:repository_id/revisions.:format',
+ repository_views.connect 'projects/:id/repository/revisions.:format',
:action => 'revisions'
- repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev',
+ repository_views.connect 'projects/:id/repository/revisions/:rev',
:action => 'revision'
- repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/diff',
+ repository_views.connect 'projects/:id/repository/revisions/:rev/diff',
:action => 'diff'
- repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/diff.:format',
+ repository_views.connect 'projects/:id/repository/revisions/:rev/diff.:format',
:action => 'diff'
- repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/raw/*path',
+ repository_views.connect 'projects/:id/repository/revisions/:rev/raw/*path',
:action => 'entry', :format => 'raw'
- repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/:action/*path',
+ repository_views.connect 'projects/:id/repository/revisions/:rev/:action/*path',
:requirements => {
:action => /(browse|show|entry|changes|annotate|diff)/,
:rev => /[a-z0-9\.\-_]+/
}
- repository_views.connect 'projects/:id/repository/:repository_id/raw/*path',
+ repository_views.connect 'projects/:id/repository/raw/*path',
:action => 'entry', :format => 'raw'
- repository_views.connect 'projects/:id/repository/:repository_id/:action/*path',
+ repository_views.connect 'projects/:id/repository/:action/*path',
:requirements => { :action => /(browse|show|entry|changes|annotate|diff)/ }
+
repository_views.connect 'projects/:id/repository/:repository_id',
:action => 'show'
end