我试图使用Rails 4应用程序 Twitter’s ActiveRecord Reputation System gem 我已经在我的Gemfile中添加了gem’activerecord-reputation-system’并运行了bundle install 当我运行rails generate reputation_system时,我收到
我已经在我的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中解决了这个问题