class coercion?

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.