method
destroy
rails latest stable - Class:
CommentsController
destroy()public
No documentation available.
# File railties/guides/code/getting_started/app/controllers/comments_controller.rb, line 9
def destroy
@post = Post.find(params[:post_id])
@comment = @post.comments.find(params[:id])
@comment.destroy
redirect_to post_path(@post)
end