Skip to content
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

DCC Bug #693 - Fix for pagination of plans retreived using the REST API V0 #3105

Merged
merged 1 commit into from
Feb 10, 2022

Conversation

johnpinto1
Copy link
Contributor

Fix for DCC Issue https://github.com/DigitalCurationCentre/DMPonline-Service/issues/693

Changes:

  • replaced wrongly named param :page_size with :per_page that is used in
    pagination in app/controllers/api/v0/base_controller.rb
  • added a before_action :page_params to app/controllers/api/v0/plans_controller.rb
  • added code to retreive :per_page param to scope in
    app/controllers/concerns/paginable.rb.

V0.

Changes:
- replaced wrongly named param :page_size with :per_page that is used in
pagination in app/controllers/api/v0/base_controller.rb
- added a before_action :page_params to app/controllers/api/v0/plans_controller.rb
- added code to retreive :per_page param to scope in
app/controllers/concerns/paginable.rb.
@johnpinto1 johnpinto1 force-pushed the bug_dcc_693_EUR-API1-V0-Plans-Pagination branch from 3134e27 to 2f068f8 Compare February 10, 2022 11:35
@johnpinto1
Copy link
Contributor Author

@briri & @raycarrick-ed The test error is (nothing to do with changes):

Failed examples:
rspec ./spec/features/locales_spec.rb:51 # Locales when new locale has no region user changes their locale

@briri briri merged commit 2f068f8 into development Feb 10, 2022
@briri briri deleted the bug_dcc_693_EUR-API1-V0-Plans-Pagination branch February 10, 2022 16:09
@briri
Copy link
Contributor

briri commented Feb 10, 2022

can confirm the error isn't related to the changes @johnpinto1 made.

I fixed it by removing the trailing 's' on the token in that string. I can't wrap my head around why it wants a trailing 's' in some places and not others. The examples in thee rubocop docs appear to be contradictory: https://www.rubydoc.info/github/bbatsov/RuboCop/RuboCop/Cop/Style/FormatStringToken

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants