Project

General

Profile

« Previous | Next » 

Revision f4459c11

Added by David Davis about 8 years ago

Refs #3809 - Turning on some rubocop cops

View differences:

app/helpers/audits_helper.rb
type_name = audited_type audit
case type_name
when 'Puppet Class'
"#{id_to_label audit.audited_changes.keys[0], audit.audited_changes.values[0]}"
(id_to_label audit.audited_changes.keys[0], audit.audited_changes.values[0]).to_s
else
name = audit.auditable_name.blank? ? audit.revision.to_label : audit.auditable_name
name += " / #{audit.associated_name}" if audit.associated_id and !audit.associated_name.blank?
......
end
elsif !main_object? audit
["#{audit_action_name(audit).humanize} #{id_to_label audit.audited_changes.keys[0], audit.audited_changes.values[0]}
#{audit_action_name(audit)=="removed" ? "from" : "to"} #{audit.associated_name || id_to_label(audit.audited_changes.keys[1], audit.audited_changes.values[1])}"]
#{audit_action_name(audit)=='removed' ? 'from' : 'to'} #{audit.associated_name || id_to_label(audit.audited_changes.keys[1], audit.audited_changes.values[1])}"]
else
[]
end

Also available in: Unified diff