Forum: Ruby on Rails Encrypting serialized Attribute

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
heisam (Guest)
on 2009-05-06 19:51
(Received via mailing list)
Hi,

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
deserialization.

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

Sam
This topic is locked and can not be replied to.