Module: ForemanExpireHosts::AuditsHelperExtensions

Extended by:
ActiveSupport::Concern
Defined in:
app/helpers/concerns/foreman_expire_hosts/audits_helper_extensions.rb

Instance Method Summary collapse

Instance Method Details

#destroyed_expired_host_audit_comment_in_list(audit) ⇒ Object



7
8
9
10
11
# File 'app/helpers/concerns/foreman_expire_hosts/audits_helper_extensions.rb', line 7

def destroyed_expired_host_audit_comment_in_list(audit)
  return unless audit.auditable_type.to_s == 'Host' && audit.action == 'destroy' && audit.comment.present?

  "<div style='color: #737373;font-size: 14px'>Comment: #{audit.comment}</div>".html_safe
end

#destroyed_expired_host_audit_comment_in_show(audit) ⇒ Object



13
14
15
16
17
# File 'app/helpers/concerns/foreman_expire_hosts/audits_helper_extensions.rb', line 13

def destroyed_expired_host_audit_comment_in_show(audit)
  return unless audit.auditable_type.to_s == 'Host' && audit.action == 'destroy' && audit.comment.present?

  "<tr><td>Comment</td><td>#{audit.comment}</td></tr>".html_safe
end