-
Notifications
You must be signed in to change notification settings - Fork 15k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Feature Request) Named routes #401
Comments
sorry I dont think I want this. however you could easily roll your own, view the resource example, I think that could be tweeked to do what you want here. |
Fair enough. The resource example doesn't quite cut it, unfortunately, since urls like '/user/3' still had to be hardcoded. I suppose I could put routes on my models, but I'd really like to hook in to the parsing of url wildcards, as in rkh/sinatra-advanced-routes. I'll try my hand at rolling my own for the time being, but I should be able to come up with something a little more general. Actually, just exposing a method (this is in Connect, I guess) to resolve a path given a route template and keys would be sufficient. |
So I've rolled my own in a general fashion - I realized the functionality I wanted is independent of Connect's route resolution. It's up here. Thanks for your patience! |
cool man :D |
The idea here is to have a Single Source of Truth for my routes. So for example:
Alternatively,
app.verb
could return a route object, which could be made available through exports. I'd also be happy to work on this feature.The text was updated successfully, but these errors were encountered: