summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-05 16:35:27 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-05 16:35:27 +0000
commit78bd24c6f738ea946622bfab5b6ea8a2040f5bde (patch)
treed170a86a5fe88326435223b19b5670fe2c5df439 /config
parent229b2f8d2af251e1bce0fa11946c41095c19f834 (diff)
downloadredmine-78bd24c6f738ea946622bfab5b6ea8a2040f5bde.tar.gz
redmine-78bd24c6f738ea946622bfab5b6ea8a2040f5bde.zip
Resourcified project memberships.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8789 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb12
1 files changed, 3 insertions, 9 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 15953076f..66f0182be 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -96,15 +96,6 @@ ActionController::Routing::Routes.draw do |map|
map.connect 'my/order_blocks', :controller => 'my', :action => 'order_blocks',
:conditions => {:method => :post}
- map.connect 'projects/:id/members/new', :controller => 'members',
- :action => 'new', :conditions => { :method => :post }
- map.connect 'members/edit/:id', :controller => 'members',
- :action => 'edit', :id => /\d+/, :conditions => { :method => :post }
- map.connect 'members/destroy/:id', :controller => 'members',
- :action => 'destroy', :id => /\d+/, :conditions => { :method => :post }
- map.connect 'members/autocomplete_for_member/:id', :controller => 'members',
- :action => 'autocomplete_for_member', :conditions => { :method => :post }
-
map.with_options :controller => 'users' do |users|
users.user_membership 'users/:id/memberships/:membership_id',
:action => 'edit_membership',
@@ -178,6 +169,9 @@ ActionController::Routing::Routes.draw do |map|
project.resources :boards
project.resources :repositories, :shallow => true, :except => [:index, :show],
:member => {:committers => [:get, :post]}
+ project.resources :memberships, :shallow => true, :controller => 'members',
+ :only => [:create, :update, :destroy],
+ :collection => {:autocomplete => :get}
project.wiki_start_page 'wiki', :controller => 'wiki', :action => 'show', :conditions => {:method => :get}
project.wiki_index 'wiki/index', :controller => 'wiki', :action => 'index', :conditions => {:method => :get}