accept_nested_attributes_for with belong_to polymorphic
Me gustaría establecer una relación polimórfica conaccepts_nested_attributes_for
. Aquí está el código:
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
Cuando intento accederJob.create(..., :client_attributes=>{...}
me daNameError: uninitialized constant Job::Client