Sha256: 269b831e78040fb2a2f8e43ea06378476a4ff37ffacb66c43efe6f2a2e80e3c2
Contents?: true
Size: 575 Bytes
Versions: 3
Compression:
Stored size: 575 Bytes
Contents
require "binary_serializer" class LazyPerson < ActiveRecord::Base include Vault::EncryptedModel self.table_name = "people" vault_lazy_decrypt! vault_attribute :ssn vault_attribute :credit_card, encrypted_column: :cc_encrypted, path: "credit-secrets", key: "people_credit_cards" vault_attribute :details, serialize: :json vault_attribute :business_card, serialize: BinarySerializer vault_attribute :favorite_color, encode: ->(raw) { "xxx#{raw}xxx" }, decode: ->(raw) { raw && raw[3...-3] } vault_attribute :non_ascii end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
vault-rails-0.4.0 | spec/dummy/app/models/lazy_person.rb |
vault-rails-0.3.2 | spec/dummy/app/models/lazy_person.rb |
vault-rails-0.3.1 | spec/dummy/app/models/lazy_person.rb |