Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A administrate
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 96
    • Issues 96
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 32
    • Merge requests 32
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • thoughtbot, inc.
  • administrate
  • Merge requests
  • !1725

Fix pagination of "Page" models

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Pablo Brasero requested to merge github/fork/pablobm/fix-page-pagination into master Jul 30, 2020
  • Overview 19
  • Commits 3
  • Pipelines 0
  • Changes 16

Fixes https://github.com/thoughtbot/administrate/issues/1709

Using the param :page for top-level pagination (ie: index pages as opposed to has_many lists in show pages) conflicts with paginating resources whose type happens to be "Page".

I'd rather have written a unit spec for this, instead of a whole new dashboard for the example app. However the pagination code is all over the place making this quite tricky. Ideally, we should move all the pagination code into a single module that can be tested in isolation. This in turn is not easy, as Kaminari doesn't make it easy. I'm leaving that for another day.

I have created a new feature spec called pagination_spec.rb. Into this I have moved other pre-existing pagination examples, to help organise things, and also to take advantage of the helper method expect_to_appear_in_order in the new example.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/pablobm/fix-page-pagination