在一个使用Rails 4.1.1版本的应用程序中,我在articles_controller中有以下的create方法:
def create
@article = Article.new(article_params)
authorize @article
if @article.save
flash[:notice] = "Successfully created article."
redirect_to edit_article_path(@article)
else
render :new
end
end
然而,在升级到Rails 4.2之后,尝试重定向时会出现以下错误:
参数个数错误(应为1个,实际传入了2个)
为什么会出现这个错误,如何解决?