fix "Page not found" on OK button in SCM "View all revisions" page (#12196)

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10707 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2012-10-24 07:59:16 +00:00
parent 881a22d248
commit 440232a54d
2 changed files with 19 additions and 12 deletions

View File

@ -221,7 +221,9 @@ RedmineApp::Application.routes.draw do
:to => 'repositories#changes' :to => 'repositories#changes'
get 'projects/:id/repository/:repository_id/revisions/:rev', :to => 'repositories#revision' get 'projects/:id/repository/:repository_id/revisions/:rev', :to => 'repositories#revision'
get 'projects/:id/repository/:repository_id/revision', :to => 'repositories#revision' match 'projects/:id/repository/:repository_id/revision',
:to => 'repositories#revision',
:via => [:get, :post]
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'
@ -241,7 +243,8 @@ RedmineApp::Application.routes.draw do
get 'projects/:id/repository/revisions', :to => 'repositories#revisions' get 'projects/:id/repository/revisions', :to => 'repositories#revisions'
get 'projects/:id/repository/revisions/:rev', :to => 'repositories#revision' get 'projects/:id/repository/revisions/:rev', :to => 'repositories#revision'
get 'projects/:id/repository/revision', :to => 'repositories#revision' match 'projects/:id/repository/revision', :to => 'repositories#revision',
:via => [:get, :post]
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/:action(/*path(.:ext))', get 'projects/:id/repository/revisions/:rev/:action(/*path(.:ext))',

View File

@ -321,12 +321,14 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest
{ :controller => 'repositories', :action => 'changes', :id => 'redmine', { :controller => 'repositories', :action => 'changes', :id => 'redmine',
:path => @path_hash[:param] } :path => @path_hash[:param] }
) )
["get", "post"].each do |method|
assert_routing( assert_routing(
{ :method => 'get', { :method => method,
:path => "/projects/redmine/repository/revision" }, :path => "/projects/redmine/repository/revision" },
{ :controller => 'repositories', :action => 'revision', :id => 'redmine' } { :controller => 'repositories', :action => 'revision', :id => 'redmine' }
) )
end end
end
def test_repositories_non_revisions_path_with_repository_id def test_repositories_non_revisions_path_with_repository_id
assert_routing( assert_routing(
@ -392,12 +394,14 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest
{ :controller => 'repositories', :action => 'changes', :id => 'redmine', :repository_id => 'foo', { :controller => 'repositories', :action => 'changes', :id => 'redmine', :repository_id => 'foo',
:path => @path_hash[:param] } :path => @path_hash[:param] }
) )
["get", "post"].each do |method|
assert_routing( assert_routing(
{ :method => 'get', { :method => method,
:path => "/projects/redmine/repository/foo/revision" }, :path => "/projects/redmine/repository/foo/revision" },
{ :controller => 'repositories', :action => 'revision', :id => 'redmine', :repository_id => 'foo'} { :controller => 'repositories', :action => 'revision', :id => 'redmine', :repository_id => 'foo'}
) )
end end
end
def test_repositories_related_issues def test_repositories_related_issues
assert_routing( assert_routing(