I haven’t found an exact statement of this problem yet, but if you find one please direct me accordingly.
My one problem with polymorphic associations is that your code is now in the database. What happens when you rename a class, or re-scope it’s module?
Since class name changes are much more common than table name changes (citation needed), or at the very least you’re not in the DB layer of the world and may perhaps not think of it (whereas the inverse may be true), I think it makes sense to add an option to reference the polymorphic relationship by table.
polymorphable_table # or polymorphable_table_name
I haven’t looked into how one would retrieve the class name from the table, but based on this SO post one would have to find a way to perhaps cache the model to table name. Models are all loaded anyway, so we could create a reverse-lookup.
Even with thousands of models, I don’t think this is unreasonable for the convenience, but I’m open to being wrong.