You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 13, 2022. It is now read-only.
A fix might be to recognize the [thing]_id:integer[thing]_type:string pattern and not attempt to create the foreign key. I can't think of anything more accurate since the polymorphic relation is defined in the model class, not in the migration.
@smudge that does seem like a reasonable solution, No time for me to do it myself right now but I'd be happy to accept a PR, should somebody want to code it up. (it should support :foreign_key => yes to force the foreign key anyway.) (and of course should included tests!)
If you use schema_plus together with friendly_id it tries to create foreign_keys for non-existing relations.
Solution is
But it feels like this is a bug handling polymorphic relations
More info: norman/friendly_id#552 (comment)
The text was updated successfully, but these errors were encountered: