Sha256: 471c58a2bcc013cc19d1dbddc979fd3be663fe5ea36b67d4bdf39373c170992e

Contents?: true

Size: 300 Bytes

Versions: 4

Compression:

Stored size: 300 Bytes

Contents

class LazySinglePerson < ActiveRecord::Base
  include Vault::EncryptedModel

  self.table_name = "people"

  vault_lazy_decrypt!
  vault_single_decrypt!

  vault_attribute :ssn

  vault_attribute :credit_card,
    encrypted_column: :cc_encrypted

  def encryption_context
    "user_#{id}"
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vault-rails-0.8.0 spec/dummy/app/models/lazy_single_person.rb
vault-rails-0.7.1 spec/dummy/app/models/lazy_single_person.rb
vault-rails-0.7.0 spec/dummy/app/models/lazy_single_person.rb
vault-rails-0.6.0 spec/dummy/app/models/lazy_single_person.rb