我正在使用Ruby 1.8.7和Rails 3.0.3。ActionController :: InvalidAuthenticityToken在rails 3.0.3中上传时
当我上传文件我得到以下错误:
ActionController::InvalidAuthenticityToken
我尝试添加以下到我的模型文件:
protect_from_forgery :only => [:create, :update, :destroy]
skip_before_filter :verify_authenticity_token
如何解决呢?
想必您将这些添加到您的控制器,而不是型号 – noodl 2011-03-04 11:37:43