mirror of
https://github.com/internetee/registry.git
synced 2025-08-06 01:35:10 +02:00
Fix deprecation issues with has_paper_trail
This commit is contained in:
parent
602cf78dfe
commit
7580824a38
3 changed files with 7 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
class Action < ApplicationRecord
|
||||
has_paper_trail class_name: 'ActionVersion'
|
||||
has_paper_trail versions: { class_name: 'ActionVersion' }
|
||||
|
||||
belongs_to :user
|
||||
belongs_to :contact
|
||||
|
@ -16,4 +16,4 @@ class Action < ApplicationRecord
|
|||
raise 'Action object is missing' unless contact
|
||||
"contact_#{operation}".to_sym
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -7,9 +7,10 @@ module Versions
|
|||
attr_accessor :version_loader
|
||||
|
||||
if WITH_CHILDREN.include?(model_name.name)
|
||||
has_paper_trail class_name: "#{model_name}Version", meta: { children: :children_log }
|
||||
has_paper_trail versions: { class_name: "#{model_name}Version" },
|
||||
meta: { children: :children_log }
|
||||
else
|
||||
has_paper_trail class_name: "#{model_name}Version"
|
||||
has_paper_trail versions: { class_name: "#{model_name}Version" }
|
||||
end
|
||||
|
||||
# add creator and updator
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
# Used in Registrant portal to collect registrant verifications
|
||||
# Registrant postgres user can access this table directly.
|
||||
class RegistrantVerification < ApplicationRecord
|
||||
has_paper_trail class_name: 'RegistrantVerificationVersion'
|
||||
has_paper_trail versions: { class_name: 'RegistrantVerificationVersion' }
|
||||
|
||||
|
||||
# actions
|
||||
CONFIRMED = 'confirmed'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue