We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I need to add a default params to one of my resources.
I found a way by using QueryBuilder#with_params:
QueryBuilder#with_params
class MyResource def self._new_scope query_builder.new(self).with_params(_foo: 'bar') end end
The following works:
MyResource.all MyResource.paginate(page: 2, per_page: 30).to_a
But when I do:
MyResource.paginate(page: 2, per_page: 30).pages.first MyResource.all.pages.next
the extra params is not passed.
Am I doing it correctly? Or do I need to build a custom Requestor for this resource to add the params?
Requestor
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I need to add a default params to one of my resources.
I found a way by using
QueryBuilder#with_params
:The following works:
But when I do:
the extra params is not passed.
Am I doing it correctly? Or do I need to build a custom
Requestor
for this resource to add the params?The text was updated successfully, but these errors were encountered: