-
Notifications
You must be signed in to change notification settings - Fork 205
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
Query string parameters name clashes #89
Comments
In order to preserve the current API, we could instead just accept a If you think that is acceptable, I'd be willing to accept a PR for it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
It's currently not possible to have a query string parameter like
distance
, as it would most probably cause scrivener_html to raiseArithmeticError
or at least have some undesired side-effect.This is due to the fact that there is no distinction between
pagination_links
's own keywords and the possible query string parameter we can provide.The workaround I found was to have a separate data structure with my query parameters, and to use the
:path
parameter to point not directly to a route helper but to another function, which will take the initial@conn
and my data structure and make the call to the route helper.Would it be possible to accept an anonymous function for example, which would be called with just the pagination parameters?
This would help keep a clean API, and even maybe remove the
@conn
parameter (as far as I can tell it's only used for the path, but is passed around all the way to raw_pagination_links...)If this is OK for you I can try to implement this, but it may induce an API change, hence the discussion.
The text was updated successfully, but these errors were encountered: