From 79574d52c0cf4f339a03701eafb2cb9e14447afd Mon Sep 17 00:00:00 2001 From: qinmingyuan Date: Thu, 26 Oct 2023 22:25:40 +0800 Subject: [PATCH] instance --- app/models/auditor/model/audit/destroyed_audit.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/auditor/model/audit/destroyed_audit.rb b/app/models/auditor/model/audit/destroyed_audit.rb index 7430fa8..97cc3d5 100644 --- a/app/models/auditor/model/audit/destroyed_audit.rb +++ b/app/models/auditor/model/audit/destroyed_audit.rb @@ -9,7 +9,8 @@ module Model::Audit::DestroyedAudit end def record - audited_type.constantize.new audited_changes + return @record if defined? @record + @record = audited_type.constantize.new audited_changes end end