summaryrefslogtreecommitdiffstats
path: root/config/routes.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-05-16 16:57:53 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-05-16 16:57:53 +0000
commiteab2c74e10a5a7e4489524f2e8218b4ff247c095 (patch)
tree185f6383a1fc0b17b5abeadd52b328b30eb171ef /config/routes.rb
parent35ca8732697c4a4e8b90edede8b01d0807558361 (diff)
downloadredmine-eab2c74e10a5a7e4489524f2e8218b4ff247c095.tar.gz
redmine-eab2c74e10a5a7e4489524f2e8218b4ff247c095.zip
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
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb26
1 files changed, 17 insertions, 9 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 7d0ff8573..2bf784b23 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -99,9 +99,11 @@ RedmineApp::Application.routes.draw do
match 'copy', :via => [:get, :post]
end
- resources :memberships, :shallow => true, :controller => 'members', :only => [:index, :show, :new, :create, :update, :destroy] do
- collection do
- get 'autocomplete'
+ shallow do
+ resources :memberships, :controller => 'members', :only => [:index, :show, :new, :create, :update, :destroy] do
+ collection do
+ get 'autocomplete'
+ end
end
end
@@ -134,15 +136,19 @@ RedmineApp::Application.routes.draw do
get 'report', :on => :collection
end
resources :queries, :only => [:new, :create]
- resources :issue_categories, :shallow => true
+ shallow do
+ resources :issue_categories
+ end
resources :documents, :except => [:show, :edit, :update, :destroy]
resources :boards
- resources :repositories, :shallow => true, :except => [:index, :show] do
- member do
- match 'committers', :via => [:get, :post]
+ shallow do
+ resources :repositories, :except => [:index, :show] do
+ member do
+ match 'committers', :via => [:get, :post]
+ end
end
end
-
+
match 'wiki/index', :controller => 'wiki', :action => 'index', :via => :get
resources :wiki, :except => [:index, :new, :create], :as => 'wiki_page' do
member do
@@ -176,7 +182,9 @@ RedmineApp::Application.routes.draw do
get 'report'
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
match '/issues', :controller => 'issues', :action => 'destroy', :via => :delete