This is the resolution of a test task
Requirements
- Ruby 2.6.0 or higher
- MongoDB
Clone repository
git clone git@github.com:romanrod/callactions.git
Bundle
bundle install
Run tests
rake test
Run the App
rake start
Enjoy!
Develop an API with the following resources and properties
- First Name (String)
- Last Name (String)
- Cell Phone (String)
- Zip Code (Number)
- Contact ID (Number)
- Description (String)
- All fields must be required
- Todos los registros deben tener los campos create_at y updated_at
- All registers must include
created_at
andupdated_at
Required endpoints
for Contacts
- GET /contacts/
- GET /contacts/:id
- POST /contacts/
- PUT /contacts/:id
- DELETE
for Activities
- GET /contacts/:id/activities
- POST /contacts/:id/activities
- PUT /contacts/:id/activities/:id
- DELETE
- Should be coded in Ruby
- Dababase as your choice
- Content type must be "application/json"