Rails 3.2.3: How to mass assign associated models?
问题 I have a rails 3.2.3, I have a form with two nested models, when I try to submit the form, I get this error: ActiveModel::MassAssignmentSecurity::Error in ExperimentsController#create Can't mass-assign protected attributes: descriptions_attributes, circuits_attributes Here is my models: class Experiment < ActiveRecord::Base attr_accessible :title, :intro_text has_many :circuits, :dependent => :destroy has_many :descriptions, :dependent => :destroy accepts_nested_attributes_for :descriptions,