mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 09:27:19 +02:00
111864739-contact_type_added
This commit is contained in:
parent
556868da6f
commit
2430bfebf2
1 changed files with 7 additions and 3 deletions
|
@ -1,6 +1,5 @@
|
|||
namespace :documents do
|
||||
|
||||
|
||||
desc 'Generate all'
|
||||
task all: :environment do
|
||||
Rake::Task['documents:log'].invoke
|
||||
|
@ -12,11 +11,16 @@ namespace :documents do
|
|||
puts '-----> Adding documets id for PaperTrail log...'
|
||||
count = 0
|
||||
|
||||
LegalDocument.where(documentable_type: Domain).find_each do |x|
|
||||
LegalDocument.find_each do |x|
|
||||
|
||||
next if x.documentable_id.blank?
|
||||
|
||||
dc = DomainVersion.where(item_id: x.documentable_id)
|
||||
document_type = case x.documentable_type
|
||||
when 'Domain' then DomainVersion
|
||||
when 'Contact'then ContactVersion
|
||||
end
|
||||
|
||||
dc = document_type.where(item_id: x.documentable_id)
|
||||
|
||||
dc.each do |y|
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue