route: code layout clean up users route

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8387 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-12-26 13:08:52 +00:00
parent 4f9f68046c
commit a76045d792
1 changed files with 9 additions and 3 deletions

View File

@ -119,9 +119,15 @@ ActionController::Routing::Routes.draw do |map|
map.resources :users
map.with_options :controller => 'users' do |users|
users.user_memberships 'users/:id/memberships', :action => 'edit_membership', :conditions => {:method => :post}
users.user_membership 'users/:id/memberships/:membership_id', :action => 'edit_membership', :conditions => {:method => :put}
users.connect 'users/:id/memberships/:membership_id', :action => 'destroy_membership', :conditions => {:method => :delete}
users.user_memberships 'users/:id/memberships',
:action => 'edit_membership',
:conditions => {:method => :post}
users.user_membership 'users/:id/memberships/:membership_id',
:action => 'edit_membership',
:conditions => {:method => :put}
users.connect 'users/:id/memberships/:membership_id',
:action => 'destroy_membership',
:conditions => {:method => :delete}
end
# For nice "roadmap" in the url for the index action