This project contains two models, Users and Comments, where a Comment belongs to a User.
The work is divided into a number of stages:
Create a basic Comments controller that only returns all comments.
Use guard with existing tests to verify your implementation by running:
bundle exec guard
Allow users to pass page=
and limit=
as query params, to limit the results returned and support pagination.
Allow users to pass content=
as query params, to limit results only to those Comments that contain the passed value.
Allow users to pass user_name=
and user_email=
, to limit results to those Comments that their users have the appropriate values in their name and/or email.
Extract the code into a shared library
Use the shared library to add pagination and filtering to the Users controller, filtered by name=
and email=