Been struggling through the rails guide build a blog tutorial. Have, I think, everything working aside from the destroy link on the index page. When clicked, it routes to the show view for that article that's clicked on to be deleted. this is from the index.html.erb. any help is greatly appreciated.
def destroy
@article = Article.find(params[:id])
@article.destroy
redirect_to articles_path
end
private
def article_params
params.require(:article).permit(:title, :text)
end