ruby-on-rails – 带有Rails 4的ActiveRecord Reputation System
发布时间:2020-12-17 01:31:57 所属栏目:百科 来源:网络整理
导读:我试图使用Rails 4应用程序 Twitter’s ActiveRecord Reputation System gem 我已经在我的Gemfile中添加了gem’activerecord-reputation-system’并运行了bundle install 当我运行rails generate reputation_system时,我收到以下错误: /Users/Dee/.rvm/gems
我试图使用Rails 4应用程序
Twitter’s ActiveRecord Reputation System gem
我已经在我的Gemfile中添加了gem’activerecord-reputation-system’并运行了bundle install 当我运行rails generate reputation_system时,我收到以下错误: /Users/Dee/.rvm/gems/ruby-2.0.0-p247/gems/activemodel-4.0.2/lib/active_model/deprecated_mass_assignment_security.rb:14: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’en protected_attributes’添加到我的Gemfile中,但是没有修复它. 有任何想法吗? 解决方法
运用
gem 'activerecord-reputation-system',github: 'NARKOZ/activerecord-reputation-system',branch: 'rails4' 在我的Gemfile中解决了这个问题 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
推荐文章
站长推荐
- xcode – -fno-objc-arc标志设置但ARC转换仍在尝
- Swift3.0 - 类型转换
- 深入浅出之正则表达式
- ruby – 我想覆盖devise gem的authenticate_user
- ruby-on-rails – 在Rails DB中使用CamelCase而不
- 如何找到Postgres/PostgreSQL表及其索引的磁盘大
- ruby-on-rails – rails secret_key_base在生产中
- Oracle密码过期ORA-28001: the password has exp
- ruby-on-rails – Acts-as-taggable-on – 麻烦把
- 正则表达式校验输入是否是数字
热点阅读