Created
April 24, 2009 04:39
-
-
Save house9/100943 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
# before the work-around | |
class Widget | |
end | |
# after the work-around | |
require 'base64' | |
class Widget | |
# override the rails attribute (getter) | |
def name | |
Base64::decode64(self[:name]) | |
end | |
# override the rails attribute (setter) | |
def name=(value) | |
self[:name] = Base64::encode64(value) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment