I was trying to build a simple rails app with create, edit, delete method in, but when I checked on the routes the destroy method seems to missing as below;
DELETE /products/:id(.:format) products#destroy```
where the delete path is missing whereas my routes file has contains .
``` resources :products, only: [:index, :show, :new, :create, :destroy, :edit] ```
my question is:
I was wondering how do I do to create the missing destroy path and why is the reason even if i did resources on products i have still not get product delete path.
thank you so much!
Aucun commentaire:
Enregistrer un commentaire