Created
March 3, 2011 21:47
-
-
Save cvonkleist/853673 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyModel | |
attribute :complex_object_store | |
def complex_object=(object) | |
self.complex_object_store = Base64.encode64(Marshal.dump(object)) | |
end | |
def complex_object | |
Marshal.load(Base64.decode64(self.complex_object_store)) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment