summaryrefslogtreecommitdiffstats
path: root/config/routes.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-10-23 21:46:40 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-10-23 21:46:40 +0000
commitc2e73160daa7782d7a91f2b6a974a936c6f084da (patch)
tree62e174df69aba43cb5a84f2ddd278dc4562963f0 /config/routes.rb
parentca5946d82ebb96464a3d283be657bc24ce0c47f1 (diff)
downloadredmine-c2e73160daa7782d7a91f2b6a974a936c6f084da.tar.gz
redmine-c2e73160daa7782d7a91f2b6a974a936c6f084da.zip
Adds a single controller for users and groups memberships and support for adding multiple projects at once (#11702).
git-svn-id: http://svn.redmine.org/redmine/trunk@13498 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/config/routes.rb b/config/routes.rb
index a988eb311..b7f1f7984 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -73,10 +73,9 @@ Rails.application.routes.draw do
match 'my/remove_block', :controller => 'my', :action => 'remove_block', :via => :post
match 'my/order_blocks', :controller => 'my', :action => 'order_blocks', :via => :post
- resources :users
- match 'users/:id/memberships/:membership_id', :to => 'users#edit_membership', :via => [:put, :patch], :as => 'user_membership'
- match 'users/:id/memberships/:membership_id', :to => 'users#destroy_membership', :via => :delete
- match 'users/:id/memberships', :to => 'users#edit_membership', :via => :post, :as => 'user_memberships'
+ resources :users do
+ resources :memberships, :controller => 'principal_memberships'
+ end
post 'watchers/watch', :to => 'watchers#watch', :as => 'watch'
delete 'watchers/watch', :to => 'watchers#unwatch'
@@ -270,6 +269,7 @@ Rails.application.routes.draw do
resources :attachments, :only => [:show, :destroy]
resources :groups do
+ resources :memberships, :controller => 'principal_memberships'
member do
get 'autocomplete_for_user'
end
@@ -277,8 +277,6 @@ Rails.application.routes.draw do
match 'groups/:id/users', :controller => 'groups', :action => 'add_users', :id => /\d+/, :via => :post, :as => 'group_users'
match 'groups/:id/users/:user_id', :controller => 'groups', :action => 'remove_user', :id => /\d+/, :via => :delete, :as => 'group_user'
- match 'groups/destroy_membership/:id', :controller => 'groups', :action => 'destroy_membership', :id => /\d+/, :via => :post
- match 'groups/edit_membership/:id', :controller => 'groups', :action => 'edit_membership', :id => /\d+/, :via => :post
resources :trackers, :except => :show do
collection do