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
Sample::App.controllers :products do
get :index do
# url(:products, :index) => '/products'
end
get :index, :with => :id do
# url(:products, :index, :id => 5) => '/products?id=5'
# url broken, but accessing this route '/products/5' from browser works
end
end
I got workaround for handling default routing without params, so...
Next example (just rename route to get it work)
Sample::App.controllers :products do
get :index do
# url(:products, :index) => '/products'
end
get :item, :with => :id do
# url(:products, :item, :id => 5) => '/products/item/5'
end
end
It wasn't exactly what I wanted so...
Sample::App.controllers :products do
get :index do
# url(:products, :index) => '/products'
end
get :item, :map => "/products/:id" do
# url(:products, :item, :id => 5) => '/products/5'
end
# or
get :item, :parent => :products, :map => ":id" do
# url(:products, :item, :id => 5) => '/products/5'
end
end
Totally same as your example enhanced-routing
Why I need explicitly map route to "/products" or to parent? It's already in :products controller
get :index, :map => ":id" do
# url(:products, :index, :id => 5) => '/5'
end
get :index, :map => "/:id" do
# url(:products, :index, :id => 5) => '/5'
end
Isn't mapping :id and /:id should be different? First relative and second mapped to root.
The text was updated successfully, but these errors were encountered:
@tayler1 Thanks for the report!
This is not mustermann but padrino's issue.
Reported behavior seems working well in padrino-0.12.5, so I decided that the current behavior is a bug, and then I fixed the behavior.
Could you confirm the change on your project?
I don't get your new router.
Also I don't know is it https://github.com/namusyaka/mustermann19 or https://github.com/rkh/mustermann issue, I post it here.
I got workaround for handling default routing without params, so...
It wasn't exactly what I wanted so...
Totally same as your example enhanced-routing
Why I need explicitly map route to "/products" or to parent? It's already in
:products
controllerIsn't mapping
:id
and/:id
should be different? First relative and second mapped to root.The text was updated successfully, but these errors were encountered: