I'm in a weird situation where I'm storing encrypted information in a
database. For example, a User.name field would be stored in its
encrypted format, so its not human-readable when accessing:
=> ")@Nw0asna;sd//20b3Q#A02nsoasd \n"
(This is just an example. I'm not actually encrypting names and the
model isn't User But you get the idea.)
What I'm trying to figure out is the right way to go about
automatically assigning the "name" method to decrypt the data itself
when it's being pulled out for display.
For example, I tried:
self.name = decrypt_name