Skip to content

Instantly share code, notes, and snippets.

@shuber
Created November 3, 2011 23:08
Show Gist options
  • Save shuber/1338214 to your computer and use it in GitHub Desktop.
Save shuber/1338214 to your computer and use it in GitHub Desktop.
attr_encrypted test
require 'rubygems'
require 'attr_encrypted'
class User
attr_encrypted :last_name, :key => 'my super secret key'
def initialize(last_name)
self.last_name = last_name
end
end
jones = User.new('jones')
bones = User.new('bones')
puts jones.encrypted_last_name.inspect
puts bones.encrypted_last_name.inspect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment