ruby on rails - 关于Base :: cookier_verifier_secret的弃用警告

时间:2012-06-17 18:03:35

标签: ruby-on-rails ruby cookies upgrade deprecated

将应用程序从2.3升级到3.0,现在可以获得这些。 什么是解决这个问题的最佳选择,以便在最终删除时我不会遇到问题。?

DEPRECATION WARNING: ActionController::Base.cookie_verifier_secret= is deprecated. Please configure it on your application with config.secret_token=. (called from <top (required)> at /home/durrantm/Dropnot/webs/rails_v3/linker/config/initializers/cookie_verification_secret.rb:7)

我应该将secret_token设置为什么值? 在代码中我把它设置在哪里?

1 个答案:

答案 0 :(得分:0)

修复是要改变:

config/initializers/cookie_verification_secret.rb

更改:

ActionController::Base.cookie_verifier_secret=

ActionController::Base.config.secret_token=