Skip to content

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

Merged
briri merged 1 commit into
developmentfrom
bug_dcc_693_EUR-API1-V0-Plans-Pagination
Feb 10, 2022
Merged

DCC Bug #693 - Fix for pagination of plans retreived using the REST API V0#3105
briri merged 1 commit into
developmentfrom
bug_dcc_693_EUR-API1-V0-Plans-Pagination

Conversation

@johnpinto1

Copy link
Copy Markdown
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
Copy Markdown
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

briri commented Feb 10, 2022

Copy link
Copy Markdown
Contributor

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

3 participants