CRUD Application: Part 3

Learn to add the update and delete functionality to your application.

So far, your app allows you to perform the C and R of the CRUD operations. We can look at existing pets, retrieve their details, and create new ones.

Next, you will learn how to perform the U and D on our app. Here are the steps you will follow:

  1. Edit the edit action in app/controllers/pets_controller.rb to take you to the edit view
  2. Edit edit.html.erb to display the form to edit existing pets.3. Create an update method in app/controllers/pets_controller.rb to handle form updates
  3. Edit index.html.erb and show.html.erb to display Edit links
  4. Create a destroy method to handle pet removal
  5. Edit index.html.erb and show.html.erb to display Remove links

Get hands-on with 1200+ tech skills courses.