- Create a form in the post view. Rememebr you have to use the action
post
and add a hiden input field called_method
with the value of delete - Add a delete route in your actions RUb and find and delete (destroy) the post
- Reuse your post form partial
- make the form
PUT
to a new endpoint (actions.rb) - add a new
PUT
rout to update the pist similar to how you created a new one? Remember how to make changes to an Active Record model instead of creating a new one?