I have a project that is running beautifully. My only problem is, you can delete anyone's comments as long as you are signed in. I need it to where you can delete your own comments, but nobody else's. Any suggestions?

in my \_comment.html.erb partial:

```
<p><%= link_to 'Delete', [comment.post, comment],
 method: :delete,
 class: "button",
 data: { confirm: "Are you sure?" }%>
</p>

```

My Comment Controller:

```
def destroy
@post = Post.find(params[:post_id])
@comment = @post.comments.find(params[:id])
@comment.destroy unless comment.user != current_user

redirect_to post_path(@post)
end

```