From 45f4e5cbbc4c57d69d81bc38fc8ddd24b4d85558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Erik=20=C3=95unapuu?= Date: Wed, 30 Sep 2020 15:19:44 +0300 Subject: [PATCH] Use Hash methods instead of public_send to compose hash --- app/views/admin/domain_versions/archive.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/domain_versions/archive.haml b/app/views/admin/domain_versions/archive.haml index 9fdf8b000..ffeec125e 100644 --- a/app/views/admin/domain_versions/archive.haml +++ b/app/views/admin/domain_versions/archive.haml @@ -67,7 +67,7 @@ - else - contact = Contact.all_versions_for([domain.registrant_id], version.created_at).first - if contact.nil? && ver = ContactVersion.where(item_id: domain.registrant_id).last - - contact = Contact.new(ver.object.to_h.merge(ver.object_changes.to_h.each_with_object({}){|(k,v), o| o.public_send("#{k}=", v.last) } )) + - contact = Contact.new(ver.object.to_h.merge(ver.object_changes.to_h.each_with_object({}) {|(k,v), o| o[k] = v.last })) = contact.try(:name) = " ".html_safe = "(#{t(:deleted)})"