I have an item which has a hash for one of its fields. When i store it
in the db, i want to do a Marshal.dump of the hash, and similarly, do a
Marshal.load to turn the saved blob back into a hash again.
Is there a way to easily write this into the model, so that it happens
automatically when saving and loading a record?
I have an item which has a hash for one of its fields. When i store it
in the db, i want to do a Marshal.dump of the hash, and similarly, do a
Marshal.load to turn the saved blob back into a hash again.
Is there a way to easily write this into the model, so that it happens
automatically when saving and loading a record?