在一个应用程序的 Rails 4.1.1 版本中,我在articles_controller 中有以下创建方法:
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 后,尝试重定向时会出现以下错误:
wrong number of arguments (2 for 1)
为什么会发生此错误以及如何解决?