mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 03:30:33 +02:00
Test and fix contact_versions controller affected by the same bug
This commit is contained in:
parent
a93228c579
commit
cec05c3943
4 changed files with 66 additions and 4 deletions
|
@ -1,5 +1,7 @@
|
|||
module Admin
|
||||
class DomainVersionsController < BaseController
|
||||
include ObjectVersionsHelper
|
||||
|
||||
load_and_authorize_resource
|
||||
|
||||
def index
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
- @versions.each do |version|
|
||||
- if version
|
||||
- contact = Contact.new(version.object.to_h)
|
||||
- version.object_changes.to_h.each { |k,v| contact.public_send("#{k}=", v.last) }
|
||||
- attach_existing_fields(version, contact)
|
||||
|
||||
%tr
|
||||
%td= link_to(contact.name, admin_contact_version_path(version.id))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- contact = Contact.new(@version.object.to_h)
|
||||
- @version.object_changes.to_h.each { |k,v| contact.public_send("#{k}=", v.last ) }
|
||||
- attach_existing_fields(@version, contact)
|
||||
= render 'shared/title', name: contact.name
|
||||
|
||||
.row
|
||||
|
@ -41,11 +41,11 @@
|
|||
|
||||
%br
|
||||
|
||||
%dt= t(:created)
|
||||
%dt= t(:created_at)
|
||||
%dd{class: changing_css_class(@version,"created_at")}
|
||||
= l(contact.created_at, format: :short)
|
||||
|
||||
%dt= t(:updated)
|
||||
%dt= t(:updated_at)
|
||||
%dd{class: changing_css_class(@version,"updated_at")}
|
||||
= l(contact.updated_at, format: :short)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue