Use a shallow block instead of the :shallow option that ignores routes scope (#14023).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11851 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2013-05-16 16:57:53 +00:00
parent 35ca873269
commit eab2c74e10
1 changed files with 17 additions and 9 deletions

View File

@ -99,9 +99,11 @@ RedmineApp::Application.routes.draw do
match 'copy', :via => [:get, :post] match 'copy', :via => [:get, :post]
end end
resources :memberships, :shallow => true, :controller => 'members', :only => [:index, :show, :new, :create, :update, :destroy] do shallow do
collection do resources :memberships, :controller => 'members', :only => [:index, :show, :new, :create, :update, :destroy] do
get 'autocomplete' collection do
get 'autocomplete'
end
end end
end end
@ -134,12 +136,16 @@ RedmineApp::Application.routes.draw do
get 'report', :on => :collection get 'report', :on => :collection
end end
resources :queries, :only => [:new, :create] resources :queries, :only => [:new, :create]
resources :issue_categories, :shallow => true shallow do
resources :issue_categories
end
resources :documents, :except => [:show, :edit, :update, :destroy] resources :documents, :except => [:show, :edit, :update, :destroy]
resources :boards resources :boards
resources :repositories, :shallow => true, :except => [:index, :show] do shallow do
member do resources :repositories, :except => [:index, :show] do
match 'committers', :via => [:get, :post] member do
match 'committers', :via => [:get, :post]
end
end end
end end
@ -176,7 +182,9 @@ RedmineApp::Application.routes.draw do
get 'report' get 'report'
end end
end end
resources :relations, :shallow => true, :controller => 'issue_relations', :only => [:index, :show, :create, :destroy] shallow do
resources :relations, :controller => 'issue_relations', :only => [:index, :show, :create, :destroy]
end
end end
match '/issues', :controller => 'issues', :action => 'destroy', :via => :delete match '/issues', :controller => 'issues', :action => 'destroy', :via => :delete