deprecated_mass_assignment_security.rb:17:in `attr_accessible': `attr_accessible` is extracted out of Rails into a gem. Please use new recommended protection model for params(strong_parameters) or add `protected_attributes` to your Gemfile to use old one. (RuntimeError)
我尝试了消息所说的内容,将gem“strong_parameters”添加到我的Gemfile中.
但是当我做rails时,我得到了上面的错误.
更新
我试过了:
config.active_record.whitelist_attributes = true
在confgi / application.rb中,也是假的,但实际上我不明白那个选项.
解决方法
原文地址:https://www.jb51.cc/ruby/264951.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。