Navigation Menu

Skip to content

Commit

Permalink
[ci skip] a destroy action in controller, not delete [getting_stated.…
Browse files Browse the repository at this point in the history
…md].
  • Loading branch information
JuanitoFatas committed Dec 23, 2013
1 parent f4f496d commit 7c09ac7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions guides/source/getting_started.md
Expand Up @@ -1703,8 +1703,8 @@ Deleting Comments
----------------- -----------------


Another important feature of a blog is being able to delete spam comments. To do Another important feature of a blog is being able to delete spam comments. To do
this, we need to implement a link of some sort in the view and a `DELETE` action this, we need to implement a link of some sort in the view and a `destroy`
in the `CommentsController`. action in the `CommentsController`.


So first, let's add the delete link in the So first, let's add the delete link in the
`app/views/comments/_comment.html.erb` partial: `app/views/comments/_comment.html.erb` partial:
Expand All @@ -1729,7 +1729,7 @@ So first, let's add the delete link in the


Clicking this new "Destroy Comment" link will fire off a `DELETE Clicking this new "Destroy Comment" link will fire off a `DELETE
/posts/:post_id/comments/:id` to our `CommentsController`, which can then use /posts/:post_id/comments/:id` to our `CommentsController`, which can then use
this to find the comment we want to delete, so let's add a destroy action to our this to find the comment we want to delete, so let's add a `destroy` action to our
controller (`app/controllers/comments_controller.rb`): controller (`app/controllers/comments_controller.rb`):


```ruby ```ruby
Expand Down

0 comments on commit 7c09ac7

Please sign in to comment.