turingschool-examples/adopt-dont-shop-7

This is the only route that isn't exactly restful. The `new` action is used for retrieving a form for creating a new record, so this should be a `GET` method.

Closed this issue · 0 comments

          This is the only route that isn't exactly restful. The `new` action is used for retrieving a form for creating a new record, so this should be a `GET` method.

To make this more restful, this should be: get "/applications/:id/pets/new", to: "application_pets#new"

Taking a look at your controller, it looks like you are creating a new record so your chosen verb is correct but the path and action aren't. Here is what the route should look like for your intended usage: post "/applications/:id/pets", to: "application_pets#create"

Originally posted by @abdulredd in #208 (comment)