Here’s the situation …
Client has_many :licenses, :as => :holdable
Vendor has_many :licenses, :as => :holdable
License belongs_to :holdable, :polymorphic => true
License belongs_to :asset
So when creating/editing an asset, I also need to create/edit the
licenses associated with that asset. I need an intuitive way to allow
the user to select from a list of possible “holders” and assign one to
a license. My idea was to have some sort of AJAX “suggest” type field
where the user would type in the name of the holder and you get the
right object back.
Anyways, I’m having a hard time coming up with an elegant way to
populate the asset’s holdable property using AJAX. Any ideas on how I
could pass the info during a create/update?