-
Notifications
You must be signed in to change notification settings - Fork 64
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
Default segment specification in named routes #52
Comments
Nevermind. I worked out how to do this with standard defn calls and by using more defroute calls. |
Yay! |
Could probably deal with some tasty macros sometime tho to make this common stuff easier, IMHO... after I've used it for a bit longer if I have something extractible, I'll submit a PR :) |
@JulianLeviston you might actually be able to accomplish what you suggested with "nested routes" which are upcoming in |
Yep, that sounds about right :). Hopefully they treat unspecified intervening route segments in a nice way (ie with supplied defaults). |
@JulianLeviston I would hold off until the |
Cool. Still think it'd be nice and useful to have defaults for segments. All good tho :) 2 looks awesome! |
@JulianLeviston I misread your original request. I think defaults might be possible. Let me think about. |
I'd like to be able to specify a route similar to this:
And have the generated named path be able to specify default values to the parameters, rather than a keyword being used. I'm not really sure how this could be accomplished.
This is pretty closely related to having trailing slashes being elided, too... these two use-cases seem to be common enough that a solution would be really great to have in secretary itself, perhaps.
The text was updated successfully, but these errors were encountered: