Class: GdprAdmin::PaperTrail::VersionDataPolicy

Inherits:
ApplicationDataPolicy show all
Defined in:
lib/gdpr_admin/paper_trail/version_data_policy.rb

Instance Method Summary collapse

Methods inherited from ApplicationDataPolicy

before_process, before_process_record, #export, #initialize, process, #process, #process_scope

Methods included from Helpers::ScopeHelper

#scope_by_date

Methods included from Helpers::EraseHelper

#erase_fields

Methods included from Helpers::PaperTrailHelper

#anonymize_version_object, #anonymize_version_object_changes, #without_paper_trail

Methods included from Helpers::FieldAnonymizerHelper

#anonymize_field, #nilify, #nullify, #with_seed

Methods included from Anonymizers::InternetAnonymizer

#anonymize_email, #anonymize_ip, #anonymize_password, #mask_ip

Methods included from Anonymizers::ContactAnonymizer

#anonymize_city, #anonymize_country, #anonymize_country_code2, #anonymize_country_code3, #anonymize_phone_number, #anonymize_state, #anonymize_street_address, #anonymize_zip

Methods included from Anonymizers::CompanyAnonymizer

#anonymize_company

Methods included from Anonymizers::NameAnonymizer

#anonymize_first_name, #anonymize_last_name, #anonymize_name

Methods included from Helpers::DataPolicyHelper

#model_data_policy_class, #skip_data_policy!, #skip_record!

Constructor Details

This class inherits a constructor from GdprAdmin::ApplicationDataPolicy

Instance Method Details

#erase(version, item_fields = nil) ⇒ Object



10
11
12
13
# File 'lib/gdpr_admin/paper_trail/version_data_policy.rb', line 10

def erase(version, item_fields = nil)
  item_fields ||= infer_item_fields(version)
  erase_fields(version, fields, base_changes(version, item_fields))
end

#fieldsObject



15
16
17
# File 'lib/gdpr_admin/paper_trail/version_data_policy.rb', line 15

def fields
  []
end

#scopeObject



6
7
8
# File 'lib/gdpr_admin/paper_trail/version_data_policy.rb', line 6

def scope
  ::PaperTrail::Version.none
end