Forum: Ruby on Rails class coercion?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
E3131298f66e50e5626e96a2848fc665?d=identicon&s=25 jfrankov (Guest)
on 2007-07-17 02:59
(Received via mailing list)
I'm not sure if this is a. possible or b. what I want to do, but I'm
curious: is it possible to force a Ruby class to become a different
class? I'm getting this error in my rails app:

ActiveRecord::AssociationTypeMismatch (TagLocality expected, got

I'm wondering if there's some way to take that Class object and
"magick" it into a TagLocality object, thereby solving my problems and
creating world peace.

Any ideas or tips are welcome and very appreciated.

This topic is locked and can not be replied to.