Please use new recommended protection model for params(strong_parameters) or add `protected_attributes` to your gemfile
问题 This happened when I added an attr_accessible to my Relationship model. class Relationship < ActiveRecord::Base attr_accessible :followed_id end Without using Devise or a protected_attributes gem, what is the way around this? I know that in controllers you call a private method requiring and permitting fields. Is this something you should do in the model too? What is the convention here? Thanks! 回答1: In Rails 4 you use Strong Parameters instead of Protected Attributes. (You don't need to