This repository has been archived by the owner on Jan 12, 2021. It is now read-only.
Fix next_page on Dashboard.recent and Stat.latest_for_teams #41
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Calling
next_page
onDashboard.recent
orStat.latest_for_teams
would return a merge for nil error. This turned out to be because the pagination wasn't set up when callingfind_every
. After fixing that it was discovered that thePaginatedCollection
useswhere
fornext_page
calls so that had to be enabled.This also requires some server side changes due to
where
making a PUT request. PUT was not supported for these two endpoints previously.I also discovered that
next_page
would cause a server side error on other APIs. This was because the logic inwhere
that parses the page numbers was not always a symbol key, causing the page parameter to get merged into the filter params. I fixed this by adding awith_indifferent_access
on the params before they are parsed.This fixes the reopening of #33.