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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -