route: add constraints to repositories which are lost in Rails3 route
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9546 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
d7e14cb7b7
commit
dd23e07111
|
@ -220,8 +220,18 @@ RedmineApp::Application.routes.draw do
|
||||||
post 'projects/:id/repository/:repository_id/revisions/:rev/issues', :to => 'repositories#add_related_issue'
|
post 'projects/:id/repository/:repository_id/revisions/:rev/issues', :to => 'repositories#add_related_issue'
|
||||||
delete 'projects/:id/repository/:repository_id/revisions/:rev/issues/:issue_id', :to => 'repositories#remove_related_issue'
|
delete 'projects/:id/repository/:repository_id/revisions/:rev/issues/:issue_id', :to => 'repositories#remove_related_issue'
|
||||||
get 'projects/:id/repository/:repository_id/revisions', :to => 'repositories#revisions'
|
get 'projects/:id/repository/:repository_id/revisions', :to => 'repositories#revisions'
|
||||||
get 'projects/:id/repository/:repository_id/revisions/:rev/:format(/*path(.:ext))', :to => 'repositories#entry', :format => /raw/
|
get 'projects/:id/repository/:repository_id/revisions/:rev/:format(/*path(.:ext))',
|
||||||
get 'projects/:id/repository/:repository_id/revisions/:rev/:action(/*path(.:ext))', :controller => 'repositories', :action => /(browse|show|entry|changes|annotate|diff)/
|
:to => 'repositories#entry',
|
||||||
|
:constraints => {
|
||||||
|
:format => 'raw',
|
||||||
|
:rev => /[a-z0-9\.\-_]+/
|
||||||
|
}
|
||||||
|
get 'projects/:id/repository/:repository_id/revisions/:rev/:action(/*path(.:ext))',
|
||||||
|
:controller => 'repositories',
|
||||||
|
:constraints => {
|
||||||
|
:action => /(browse|show|entry|changes|annotate|diff)/,
|
||||||
|
:rev => /[a-z0-9\.\-_]+/
|
||||||
|
}
|
||||||
|
|
||||||
get 'projects/:id/repository/statistics', :to => 'repositories#stats'
|
get 'projects/:id/repository/statistics', :to => 'repositories#stats'
|
||||||
get 'projects/:id/repository/graph', :to => 'repositories#graph'
|
get 'projects/:id/repository/graph', :to => 'repositories#graph'
|
||||||
|
@ -232,8 +242,18 @@ RedmineApp::Application.routes.draw do
|
||||||
get 'projects/:id/repository/revision', :to => 'repositories#revision'
|
get 'projects/:id/repository/revision', :to => 'repositories#revision'
|
||||||
post 'projects/:id/repository/revisions/:rev/issues', :to => 'repositories#add_related_issue'
|
post 'projects/:id/repository/revisions/:rev/issues', :to => 'repositories#add_related_issue'
|
||||||
delete 'projects/:id/repository/revisions/:rev/issues/:issue_id', :to => 'repositories#remove_related_issue'
|
delete 'projects/:id/repository/revisions/:rev/issues/:issue_id', :to => 'repositories#remove_related_issue'
|
||||||
get 'projects/:id/repository/revisions/:rev/:format(/*path(.:ext))', :to => 'repositories#entry', :format => /raw/
|
get 'projects/:id/repository/revisions/:rev/:format(/*path(.:ext))',
|
||||||
get 'projects/:id/repository/revisions/:rev/:action(/*path(.:ext))', :controller => 'repositories', :action => /(browse|show|entry|changes|annotate|diff)/
|
:to => 'repositories#entry',
|
||||||
|
:constraints => {
|
||||||
|
:format => 'raw',
|
||||||
|
:rev => /[a-z0-9\.\-_]+/
|
||||||
|
}
|
||||||
|
get 'projects/:id/repository/revisions/:rev/:action(/*path(.:ext))',
|
||||||
|
:controller => 'repositories',
|
||||||
|
:constraints => {
|
||||||
|
:action => /(browse|show|entry|changes|annotate|diff)/,
|
||||||
|
:rev => /[a-z0-9\.\-_]+/
|
||||||
|
}
|
||||||
get 'projects/:id/repository/:repository_id/:format(/*path(.:ext))', :to => 'repositories#entry', :format => /raw/
|
get 'projects/:id/repository/:repository_id/:format(/*path(.:ext))', :to => 'repositories#entry', :format => /raw/
|
||||||
get 'projects/:id/repository/:repository_id/:action(/*path(.:ext))', :controller => 'repositories', :action => /(browse|show|entry|changes|annotate|diff)/
|
get 'projects/:id/repository/:repository_id/:action(/*path(.:ext))', :controller => 'repositories', :action => /(browse|show|entry|changes|annotate|diff)/
|
||||||
get 'projects/:id/repository/:repository_id', :to => 'repositories#show', :path => nil
|
get 'projects/:id/repository/:repository_id', :to => 'repositories#show', :path => nil
|
||||||
|
|
Loading…
Reference in New Issue