REST is the core architectural pattern we use to build our Rails applications,
but it's not always clear what exactly is and isn't REST. Tune in as Matt Sumner joins Chris to discuss exactly what REST is, and how best to embrace it in your Rails apps.
With avoiding âmemberâ and âcollectionâ in routes, what would be the best way to work with resources that have the same name? Following the download example, what if we wanted to add a download feature for decks as well? There is already a downloads controller, but itâs used for videos. I guess it could always have the name prepended (decks_download and videos_download), but that doesnât feel as clean with regards to how the routes look. Is there a better way to do this?
Hi @mark_kraemer, great question. I think the suggestion you make about specifying in the name makes sense. Likely in a domain where you have multiple types of downloads, you would describe them in words as a âvideo downloadâ or a âdeck downloadâ, so that easily maps to VideoDownloadsController and DeckDownloadsController.