每次尝试在下面运行此代码时,我都会不断收到上述错误。我正在尝试从表单中删除信息。你能看看“破坏”的方法吗?
class ArticlesController < ApplicationController
def show
@article = Article.find(params[:id])
end
def new
@article = Article.new
end
def create
@article = Article.new(params[:article])
@article.save
redirect_to article_path(@article)
end
def destroy
@article = Article.new(params[:article])
@article.delete
@article.save
redirect_to article_path(@article)
end
def edit
@article = Article.find(params[:id])
end
end