Forum: Ruby on Rails Encrypting serialized Attribute

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.
heisam (Guest)
on 2009-05-06 19:51
(Received via mailing list)

I'd like to encrypt the content of a serialized attribute with rails
built in serialize declaration. Unfortunately, using the before_save
and after_find callbacks for encryption does not work in this case,
because they are called before serialization and after

Is there a way to implement custom callbacks like after_serialize and
before_deserialize or any other recommended way of implementing
encryption of serialized attributes?

Many thanks

This topic is locked and can not be replied to.