You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Routes that have the same name, but which have a different signature, cause the URL generator to think the route doesn't exist. For example:
controller :allocation do
get :index {}
get :index, :with => :id {}
end
url(:allocation_index) #=> Raises exception: route mapping for url(:place_index) could not be found!
url(:allocation_index, :id => 2) #=> Works just fine
I had expected Padrino to support routes with different signature for url generation, but this does not seem to be the case. I'm not sure if this is a bug, an oversight, or by design, but I believe Padrino should handle this case as there's no reason it couldn't.
Tom
The text was updated successfully, but these errors were encountered:
This is true, routes are only generated by name and the second definition wins. There are several issues with the router, which is why we are planning a rework.
I'll add your request to the routing rework ticket and leave it open:
Routes that have the same name, but which have a different signature, cause the URL generator to think the route doesn't exist. For example:
I had expected Padrino to support routes with different signature for url generation, but this does not seem to be the case. I'm not sure if this is a bug, an oversight, or by design, but I believe Padrino should handle this case as there's no reason it couldn't.
Tom
The text was updated successfully, but these errors were encountered: