I'm trying to figure out what to name a polymorphic association and not coming up with good options. The class that will contain the polymorphic association is called LicenseBatch, and if it weren't polymorphic, the foreign key would just be owner_id. It seems that the go-to polymorphic name would be ownerable, but what if I have another class that is ownable? I'd like this to be more specific, but things like batch_ownerable sound awkward.
Any suggestions or similar situations you have seen before?
Try to put a name that automatically refers to the model name, so if the model is Comment I would use commentable_type and commentable_id. For this specific case I would use:
licensable_batch_type and licensable_batch_id
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With