title: How to delete a nested object?
body: <p>I created a blog that has articles and comments that are inside their article. I want to create an option so I can delete comments too but when I click the delete button the error says "Couldn't find Comment with 'id'=#id here"</p>
  
  <pre><code>resources :articles do
      resources :comments
  end
  </code></pre>
  
  <p></p>
  
  <p>View</p>
  
  <pre><code>&lt;div&gt;
  &lt;h4&gt;Comment by &lt;%= comment.author_name %&gt;&lt;/h4&gt;
  &lt;p&gt;&lt;%= comment.body %&gt;&lt;/p&gt;
  &lt;/div&gt;
  &lt;p&gt; &lt;%= link_to "Delete Comment", article_comment_path(@comment.article_id, @comment.article.id), method: :delete %&gt; &lt;/p&gt;
  </code></pre>
  
  <p>Comments Controller</p>
  
  <pre><code>def destroy
      @comment = Comment.find(params[:id])
      @comment.destroy
  
      redirect_to article_path(@comment.article)
  end
  </code></pre>