roadmap icon indicating copy to clipboard operation
roadmap copied to clipboard

Missing Files in `app/controllers/paginable/` (`research_outputs_controller.rb` and `api_clients_controller.rb`)

Open aaronskiba opened this issue 1 year ago • 0 comments

Please complete the following fields as applicable:

What version of the DMPRoadmap code are you running? (e.g. v2.2.0)

  • v4.2.0

Expected behaviour:

  • The paths /super_admin/api_clients and /plans/:id/research_outputs both have clickable pagination options (e.g. page selection, "Next", "Last" or "View All"). We'd expect these pagination options to work.

Actual behaviour:

  • Using api_clients as an example, the following error is thrown when a user clicks "View All" (or any other pagination option):
Started GET "/paginable/api_clients/index/ALL" for 127.0.0.1 at 2024-10-29 11:28:09 -0600

ActionController::RoutingError - uninitialized constant Paginable::ApiClientsController
            candidate = constant.const_get(name)
                                ^^^^^^^^^^
Did you mean?  ApplicationController
            raise MissingController.new(error.message, error.name)
            ^^^^^:

(The same sort of error is encountered via the research_outputs page)

Diagnosis:

  • https://github.com/DMPRoadmap/roadmap/tree/main/app/views/paginable contains paginable views
  • https://github.com/DMPRoadmap/roadmap/tree/main/app/controllers/paginable contains paginable controllers
    • Looking at the correspondences between these two directories, we can see that https://github.com/DMPRoadmap/roadmap/tree/main/app/controllers/paginable/research_outputs_controller.rb and https://github.com/DMPRoadmap/roadmap/tree/main/app/controllers/paginable/api_clients_controller.rb appear to be the only two absent paginable controller files.

TODO:

  • [ ] Create paginable/research_outputs_controller.rb
  • [ ] Create paginable/api_clients_controller.rb

aaronskiba avatar Oct 29 '24 17:10 aaronskiba