-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Add current_page?
helper method to pages and components
#1073
Comments
@paulcsmith Do you want it to work for full uri's, including |
@wout Great question. I think host, scheme and port should be options. But I'd also be ok shipping those in a separate PR to get the basic use case of path done. Up to you though! |
Ok, I'll have a look at host and port as well. However, I need a pointer here since Crystal's I was also wondering if it is relevant these days. I don't know all the use cases, but isn't it either http or https? And if so, since https is becoming a requirement these days, should we even test on scheme? |
@wout Great point. We can skip that I think. Everyone should be using ssl and Lucky makes it easy to force with the ForceSslHandler. Also scheme shouldn't change what page is shown as long as the rest of the host and path match 👍 |
@paulcsmith That's done then. :) |
This will be used by #969
Should work similarly to Rails https://apidock.com/rails/ActionView/Helpers/UrlHelper/current_page%3F
By default it should not care about query params but passing
check_query_params: true
will include the path and query paramscc @wout
The text was updated successfully, but these errors were encountered: