From 762f891b8440f9c09e6e3d212e82c35f0f36a464 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Tue, 30 Jan 2018 19:31:49 +0200 Subject: [PATCH] Add old attribute names aliases for PaperTrail #660 --- app/models/contact.rb | 1 + app/models/domain.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/models/contact.rb b/app/models/contact.rb index b9ed99af4..3024551f8 100644 --- a/app/models/contact.rb +++ b/app/models/contact.rb @@ -18,6 +18,7 @@ class Contact < ActiveRecord::Base attr_accessor :legal_document_id alias_attribute :kind, :ident_type + alias_attribute :copy_from_id, :original_id # Old attribute name; for PaperTrail accepts_nested_attributes_for :legal_documents diff --git a/app/models/domain.rb b/app/models/domain.rb index 994721fdc..31ba838f2 100644 --- a/app/models/domain.rb +++ b/app/models/domain.rb @@ -16,6 +16,7 @@ class Domain < ActiveRecord::Base alias_attribute :on_hold_time, :outzone_at alias_attribute :outzone_time, :outzone_at + alias_attribute :auth_info, :transfer_code # Old attribute name; for PaperTrail # TODO: whois requests ip whitelist for full info for own domains and partial info for other domains # TODO: most inputs should be trimmed before validatation, probably some global logic?