Ruby on Rails 4的ActiveRecord Reputation System gem如何实现长尾词功能?
- 内容介绍
- 文章标签
- 相关推荐
本文共计204个文字,预计阅读时间需要1分钟。
我尝试使用Rails 4应用程序程序Twitter的ActiveRecord Reputation System gem。我在Gemfile中添加了gem 'activerecord-reputation-system',并执行了bundle install。当我运行rails generate reputation_system时,我收到以下信息:
我试图使用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中解决了这个问题
本文共计204个文字,预计阅读时间需要1分钟。
我尝试使用Rails 4应用程序程序Twitter的ActiveRecord Reputation System gem。我在Gemfile中添加了gem 'activerecord-reputation-system',并执行了bundle install。当我运行rails generate reputation_system时,我收到以下信息:
我试图使用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中解决了这个问题

