I don't follow. The column name isn't OldClassName, so I'm not sure what
that assignment is supposed to mean.
The issue is that a polymorphic reference can literally be any activerecord
model in your app, there's no restrictions. Really the only reliable way is
to look at the DB and group by
very model that
could be referenced in this manner. I guess that would be un-rails-like.
So perhaps the best we can do is make migration easier. Looks like there's
no way around just dealing with the DB layer once we open the "type"-like
can of worms.
On Saturday, January 12, 2019 at 10:25:12
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
3 matches
Mail list logo