Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegPhenomenon committed May 28, 2021
1 parent a8d1d66 commit 6144692
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/views/admin/domain_versions/archive.haml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
- else
- contact = Contact.all_versions_for([domain.registrant_id], version.created_at).first
- if contact.nil? && ver = Version::ContactVersion.where(item_id: domain.registrant_id).last
- result = ver.object.to_h.merge(ver.object_changes.to_h.each_with_object({}) {|(k,v), o| o[k] = v.last })&.(*Contact&.column_names)
- merged_obj = ver.object_changes.to_h.each_with_object({}) {|(k,v), o| o[k] = v.last }
- result = ver.object.to_h.merge(merged_obj)&.slice(*Contact&.column_names)
- contact = Contact.new(result)
= contact.try(:name)
= " ".html_safe
Expand Down

0 comments on commit 6144692

Please sign in to comment.