-
Notifications
You must be signed in to change notification settings - Fork 66
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 pagination info to Vets::Collection #20095
Add pagination info to Vets::Collection #20095
Conversation
Generated by 🚫 Danger |
Error: A file (or its parent directories) was deleted but its reference still exists in CODEOWNERS. Please update the .github/CODEOWNERS file and delete the entry for the Offending file: |
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: |
Error: A file (or its parent directories) was deleted but its reference still exists in CODEOWNERS. Please update the .github/CODEOWNERS file and delete the entry for the Offending file: |
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: |
Error: A file (or its parent directories) was deleted but its reference still exists in CODEOWNERS. Please update the .github/CODEOWNERS file and delete the entry for the Offending file: |
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: |
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: |
Error: A file (or its parent directories) was deleted but its reference still exists in CODEOWNERS. Please update the .github/CODEOWNERS file and delete the entry for the Offending file: |
Error: A file (or its parent directories) was deleted but its reference still exists in CODEOWNERS. Please update the .github/CODEOWNERS file and delete the entry for the Offending file: |
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: |
lib/vets/collection.rb
Outdated
if defined?(::WillPaginate::Collection) | ||
records_will_paginate_collection = records.is_a?(WillPaginate::Collection) | ||
error_message = 'Expected records to be instance of WillPaginate' | ||
raise ArgumentError, error_message if records_will_paginate_collection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the raise ArgumentError
logic here be the inverse?
unless records_will_paginate_collection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thank you!
@LindseySaari I fixed the error you found and I also added a test |
Error: A file (or its parent directories) was deleted but its reference still exists in CODEOWNERS. Please update the .github/CODEOWNERS file and delete the entry for the Offending file: |
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: |
@stevenjcumming Do you plan to merge this into master or your other base branch? I see CODEOWNERS is failing but I think that's ok if you're not merging into master. It seems it's having issue with comparing to a feature branch |
I'm just merging it into the collection feature branch. I thought it would be easier to separate the PRs like this before merging them into master. |
Mergers to a feature branch
Summary
paginate
method to collection clasPagination
to handle pagination details and record shiftingRelated issue(s)
Testing done
Acceptance criteria
Common::Collection