라우트에 Destroy 액션 추가
/posts/:id를 통해 DELETE 방식으로 요청을 보내거나, /posts/:id/delete URL을 통해 GET 방식으로 요청을 보냈을 때 포스트 컨트롤러의 Destroy 액션으로 전달되게 라우트 정보를 수정해 보자.
▼ conf/routes
GET /posts/:id/delete Post.Destroy
DELETE /posts/:id Post.Destroy
라우트에 Destroy 액션 추가
/posts/:id를 통해 DELETE 방식으로 요청을 보내거나, /posts/:id/delete URL을 통해 GET 방식으로 요청을 보냈을 때 포스트 컨트롤러의 Destroy 액션으로 전달되게 라우트 정보를 수정해 보자.
▼ conf/routes
GET /posts/:id/delete Post.Destroy
DELETE /posts/:id Post.Destroy