🥇 Inssue create the candidates section - Raquel #14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Description:
This Pull Request added various functionalities and improvements to the project, aiming to make it more robust, scalable, and easy to maintain.
closes #12
Key Changes:
Addition of Candidate Model: Added a Candidate table to the database, containing fields such as name, date_of_birth, and email. The email field is unique, and the date of birth cannot be in the past.
Controller CRUD: Implemented a controller for CRUD operations. In the index route, it is now possible to pass parameters such as limit and offset, as well as filter the elements.
Helper for Filtering: Created a helper to facilitate the use of filtering in the index route, aiming to keep the application cleaner and more organized.
Model Validations: Added proper validations in the Candidate model.
Seed Data: In the seeds.rb file, added code to include 10 candidates in the database for testing purposes.
RSpec Tests: Wrote tests using RSpec. Additionally, a shared_examples folder was created to add reusable tests.
Addition of API V1 Routes: Added routes for API V1.
Swagger Documentation: Added Swagger documentation to facilitate understanding and usage of the API.
Objective:
The goal of this Pull Request is to enhance the quality and functionality of the project, following best software development practices and contributing to a more satisfactory user experience.