WARNING: Can't mass-assign protected attributes
问题 I get this error "WARNING: Can't mass-assign protected attributes: races_attributes" , when following this http://railscasts.com/episodes/196-nested-model-form-part-1 on rails 3. Where Races are a component of Events. This is my models/race.rb: class Race < ActiveRecord::Base belongs_to :event attr_accessible :name, :unit end This is my models/event.rb: class Event < ActiveRecord::Base has_many :races, :dependent => :destroy accepts_nested_attributes_for :races attr_accessible :name, :date,