padrino/padrino-framework — Issue #802: Does url_for return nested routes
Author: jlebrech
Created: 2012-03-08 12:11:07+00:00
State: open

TL;DR maybe my knowledge is too limited, and padrino has this.

I'm coming from rails and a thing that is pestering me is using `path()` helpers, every time I change a route in rails I have to change every `path()` help all over again.

so I can do `url_for` in padrino which will create a url for me, but is this a valid route or just a simplified router.

lets say there was a path helper like this

country_city_street_person(person.country_id, person.city_id, person.id)

this is silly, because I am navigating to `/country/england/city/london/street/oxfordrd/1` where in fact the ancestor i'd shouldn't be needed.

A better way would be for `url_for(@user)` to expand to `/country/*/city/*/street/*/1`