Commits

Toshi MARUYAMA  committed b7d949a

route: change order users resources and matchings

This changes pass users tests on Rails 3.0.

  • Participants
  • Parent commits f15475f

Comments (0)

Files changed (1)

File config/routes.rb

   map.connect 'members/autocomplete_for_member/:id', :controller => 'members',
               :action => 'autocomplete_for_member', :conditions => { :method => :post }
 
-  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}
   end
+  map.resources :users
 
   # For nice "roadmap" in the url for the index action
   map.connect 'projects/:project_id/roadmap', :controller => 'versions', :action => 'index'