Class: RailsAuditLog::AuditLogEntry
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- RailsAuditLog::AuditLogEntry
- Defined in:
- app/models/rails_audit_log/audit_log_entry.rb
Constant Summary collapse
- EVENTS =
%w[create update destroy].freeze
Instance Method Summary collapse
-
#changed_attributes ⇒ Object
Instance methods.
- #diff ⇒ Object
Instance Method Details
#changed_attributes ⇒ Object
Instance methods
41 42 43 |
# File 'app/models/rails_audit_log/audit_log_entry.rb', line 41 def changed_attributes object_changes&.keys || [] end |
#diff ⇒ Object
45 46 47 48 49 |
# File 'app/models/rails_audit_log/audit_log_entry.rb', line 45 def diff return {} unless object_changes object_changes.transform_values { |from_to| { from: from_to[0], to: from_to[1] } } end |