Skip to content

Instantly share code, notes, and snippets.

@house9
Created April 24, 2009 04:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save house9/100943 to your computer and use it in GitHub Desktop.
Save house9/100943 to your computer and use it in GitHub Desktop.
# 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