routes.rb api.resources :friends, :controller => :friends, :only => [:list, :exists], :collection => {:list => :get, :ids => :get, :exists => :get} here is my rake routes. list_api_friends GET /api/friends/list {:controller=>"api/friends", :action=>"list"} formatted_list_api_friends GET /api/friends/ list.:format {:controller=>"api/ friends", :action=>"list"} this is the only accepted calls for controller => friends action => list , so when calling curl -X POST http://localhost/api/friends/list.xml should return routing error but instead of that it returns the list as if was a GET request... any suggestions
On Jul 5, 8:33 am, Waheedi <Waheed.Barghou...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> routes.rb > > api.resources :friends, :controller => :friends, :only => > [:list, :exists], :collection => {:list => :get, :ids => :get, :exists > => :get} > > here is my rake routes. > > list_api_friends GET /api/friends/list > {:controller=>"api/friends", :action=>"list"} > > formatted_list_api_friends GET /api/friends/ > list.:format {:controller=>"api/ > friends", :action=>"list"} > > this is the only accepted calls for controller => friends action => > list , so when calling > > curl -X POSThttp://localhost/api/friends/list.xmlshould return > routing error but instead of that it returns the list as if was a GET > request... >Do you still have the default route at the bottom of routes.rb ? Fred> any suggestions
definitely not its the lowest priority.. On Jul 5, 5:55 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Jul 5, 8:33 am, Waheedi <Waheed.Barghou...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > routes.rb > > > api.resources :friends, :controller => :friends, :only => > > [:list, :exists], :collection => {:list => :get, :ids => :get, :exists > > => :get} > > > here is my rake routes. > > > list_api_friends GET /api/friends/list > > {:controller=>"api/friends", :action=>"list"} > > > formatted_list_api_friends GET /api/friends/ > > list.:format {:controller=>"api/ > > friends", :action=>"list"} > > > this is the only accepted calls for controller => friends action => > > list , so when calling > > > curl -X POSThttp://localhost/api/friends/list.xmlshouldreturn > > routing error but instead of that it returns the list as if was a GET > > request... > > Do you still have the default route at the bottom of routes.rb ? > > Fred > > > any suggestions