Dee*_*kor 3 twitter gem ruby-on-rails ruby-on-rails-4
我正在尝试将Twitter的ActiveRecord Reputation System gem与Rails 4
应用程序一起使用
我添加gem 'activerecord-reputation-system'
到我的Gemfile
并且已经运行了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)
Run Code Online (Sandbox Code Playgroud)
我试过添加gem 'protected_attributes'
到我的,Gemfile
但没有解决它.
有任何想法吗?
运用
gem 'activerecord-reputation-system', github: 'NARKOZ/activerecord-reputation-system', branch: 'rails4'
Run Code Online (Sandbox Code Playgroud)
在我Gemfile
解决了这个问题