In this video series we will build a Rails API from scratch. Backend APIs are useful for serving data to frontend applications, mobile apps or other backend services.
✨ Check out the new version of this video series, which has been updated for Rails 7 • Rails 7 API Tutorial - Create project and ...
📖 You can also purchase the eBook and code for the new Rails 7 tutorial - https://tomkadwill.gumroad.com/l/rail...
This video covers:
0:16 - Adding a 'destroy' route
1:28 - Adding a 'destroy' controller for deleting records
1:40 - Writing an ActiveRecord query to find a record, using params
2:25 - Writing an ActiveRecord query to delete a record from the database, using '.destroy'
2:45 - Returning a HEAD response with 204 NO CONTENT
3:35 - Testing a DELETE request via cURL
If you’re new to this series, you may want to start with part 1: • Rails 6 API Tutorial - Create project and ...