I followed this amazing well-done tutorial on how to create an API and testing with Postman. This is the link for the tutorial: https://dev.to/lisahjung/beginner-s-guide-to-creating-an-api-from-scratch-using-rails-2eie
STEP:
- Create a new Rails API
- Enable CORS(Cross Origin Resource Sharing)
- Create model, controller, database migration table and route via rails g resource command
- Specify attributes and datatypes of a secret menu item
- Define index, show, create, update, and destroy actions
- Create routes for index, show, create, update, and destroy actions
- Seed data
- Fire up your server & postman to test API functionality