Leave your answer in the comments!
Given this routes file:
Omg::Application.routes.draw do
match ':controller(/:action(/:id(.:format)))'
end
And these controllers:
module Admin
class UserController < ActionController::Base
def show
end
end
end
class AdminController < ActionController::Base
def show
end
end
class Products < ActionController::Base
def show
end
end
What controller do these urls route to?
/products/show/10
/products/show
/admin/user/show/10
/admin/user/show
this certainly breaks the Element of Least Surprise. The products routes make perfect sense, as does
/admin/user/show #=> AdminController#user(show)
.That 3rd route has me stumped; I would expect no route to match. I suppose I could crack the router code to have a look at WTF is going on, but having to do so is kinda stinky.