accepts_nested_attributes_for с полиморфным belongs_to

Я хотел бы, настраивает полиморфное отношение с accepts_nested_attributes_for. Вот код:

class Contact <ActiveRecord::Base
  has_many :jobs, :as=>:client
end

class Job <ActiveRecord::Base
  belongs_to :client, :polymorphic=>:true
  accepts_nested_attributes_for :client
end

Когда я пытаюсь получить доступ Job.create(..., :client_attributes=>{...} дает мне NameError: uninitialized constant Job::Client

54
задан dombesz 19 October 2010 в 02:48
поделиться