mirror of
https://github.com/internetee/registry.git
synced 2025-08-18 15:33:52 +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
|
class Action < ApplicationRecord
|
||||||
has_paper_trail class_name: 'ActionVersion'
|
has_paper_trail versions: { class_name: 'ActionVersion' }
|
||||||
|
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
belongs_to :contact
|
belongs_to :contact
|
||||||
|
|
|
@ -7,9 +7,10 @@ module Versions
|
||||||
attr_accessor :version_loader
|
attr_accessor :version_loader
|
||||||
|
|
||||||
if WITH_CHILDREN.include?(model_name.name)
|
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
|
else
|
||||||
has_paper_trail class_name: "#{model_name}Version"
|
has_paper_trail versions: { class_name: "#{model_name}Version" }
|
||||||
end
|
end
|
||||||
|
|
||||||
# add creator and updator
|
# add creator and updator
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
# Used in Registrant portal to collect registrant verifications
|
# Used in Registrant portal to collect registrant verifications
|
||||||
# Registrant postgres user can access this table directly.
|
# Registrant postgres user can access this table directly.
|
||||||
class RegistrantVerification < ApplicationRecord
|
class RegistrantVerification < ApplicationRecord
|
||||||
has_paper_trail class_name: 'RegistrantVerificationVersion'
|
has_paper_trail versions: { class_name: 'RegistrantVerificationVersion' }
|
||||||
|
|
||||||
|
|
||||||
# actions
|
# actions
|
||||||
CONFIRMED = 'confirmed'
|
CONFIRMED = 'confirmed'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue