Merge branch '108869472-objects_archive' into staging

# Conflicts:
#	app/views/admin/domain_versions/show.haml
This commit is contained in:
Vladimir Krylov 2016-06-10 14:09:52 +03:00
commit 4bbebe8ad6
2 changed files with 9 additions and 4 deletions

View file

@ -63,7 +63,12 @@
%td= link_to(domain.name, admin_domain_version_path(version.id)) %td= link_to(domain.name, admin_domain_version_path(version.id))
%td %td
- if domain.registrant - if domain.registrant
= domain.registrant = domain.registrant.name
- 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[k]=v.last } ))
= contact.try(:name)
%td %td
- if domain.registrar - if domain.registrar
= link_to(domain.registrar, admin_registrar_path(domain.registrar)) = link_to(domain.registrar, admin_registrar_path(domain.registrar))