Created
November 3, 2011 23:08
-
-
Save shuber/1338214 to your computer and use it in GitHub Desktop.
attr_encrypted test
This file contains 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
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