ruby on rails - Activeadmin, polymorphic relationship and nested attributes -
i have 2 models. there provider , delivery. model note - polymorphic (belongs_to). model provider looks this:
class provider < activerecord::base attr_accessible :name, :site_url, :brand_ids, :note_attributes validates :name, presence: true has_one :note accepts_nested_attributes_for :note, allow_destroy: true end
form of creating new provider renders good. when try save
unknown attribute: provider_id
error. problem?
the note model should have attr_accessible :provider_id
Comments
Post a Comment