Learn how to safely delete records and relationships
👍 If You Enjoy This Video, Consider Hitting The Like Button!
👨💻 Series Source Code: https://github.com/adocasts/lets-lear...
🥁 Subscribe To Stay Notified For New Videos: https://www.youtube.com/adocasts?sub_...
Subscribe to Adocasts Plus to gain access to all our lessons and more!
https://adocasts.com/pricing
In this lesson, we'll learn how we can safely delete movies and their relationships. We'll discuss how we need to consider foreign key constraints, and what to do when our deletes aren't set to cascade.
⏰ Timestamps
00:00 - Adding the Delete Form and Button
01:48 - Defining our MoviesController Destroy Handler
02:30 - Considering Relationships when Deleting
04:30 - How To Delete Relationships when the Delete Does NOT Cascade
06:20 - Testing Out our Deletion
------------------------- Socials --------------------------
Website: https://adocasts.com
Threads: https://threads.net/@adocasts
Twitter: / adocasts
GitHub: https://github.com/adocasts