Chapter 4. Oh CRUD!
This chapter covers
- Expanding on the functionality of your app
- Building a RESTful resource
- Creating, updating, and deleting a resource
In chapter 3, you began writing stories for a CRUD (create, read, update, delete) interface for your Project resource. Here, you continue in that vein, beginning with writing a story for the R part of CRUD: reading. We often refer to reading as viewing in this and future chapters—we mean the same thing, but sometimes viewing is just a better word.
For the remainder of the chapter, you’ll round out the CRUD interface for projects, providing your users with ways to edit, update, and delete projects too. Best of all, you’ll be doing this using behavior-driven development the whole way through.
The show action generated for the story in chapter 3 was only half of this part of CRUD. The other part is the index action, which is responsible for showing a list of the projects. From this list, you can navigate to the show action for a particular project. The next story is about adding functionality to allow you to do that.