Sha256: 80bb84695b5dabbf2c14c1250a9411748cc572c60fce5107f596f930d9b7a039
Contents?: true
Size: 214 Bytes
Versions: 2
Compression:
Stored size: 214 Bytes
Contents
class CreditCard include Mongoid::Document include Mongoid::Encryptor field :number validates_format_of :number, :with => /^\A\d{16}\z/ encrypts :number, :mode => :symmetric, :password => 'secret' end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mongoid-encryptor-0.0.5 | spec/models/credit_card.rb |
mongoid-encryptor-0.0.4 | spec/models/credit_card.rb |