Sha256: 65a3fe89e3a8195a88a8dccea29567f17c64d9d5b123c8e652ad2753e82caa21
Contents?: true
Size: 598 Bytes
Versions: 4
Compression:
Stored size: 598 Bytes
Contents
# frozen_string_literal: true require 'active_record' module LoggableActivity # This class represends an additional data owner for a record. # For it to kick in, the data_owner configuration has to be set to true in the loggable_activity.yaml file. class DataOwner < ActiveRecord::Base belongs_to :record, polymorphic: true, optional: true belongs_to :encryption_key, class_name: '::LoggableActivity::EncryptionKey' # When a record is deleted, all data owner added to the record is also deleted. def mark_as_deleted! encryption_key.mark_as_deleted! end end end
Version data entries
4 entries across 4 versions & 1 rubygems