nested namespace route going to wrong controller
问题 Using Rails 3.0.7, I'm creating an API for our app, and I have this setup: routes.rb namespace :api do namespace :v1 do match "connect" => "users#login", :via => :post match "disconnect" => "users#logout", :via => :post resources :users match "users/:id/foos" => "foos#list", :via => :get match "users/:id" => "users#update", :via => :put match "foos/:id/bars" => "bars#list_by_foo", :via => :get match "foos/:id" => "foos#show", :via => :get, :constraints => { :id => /\d+/ } match "bars/:id" =>