Class: Audit

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/auditor/audit.rb

Instance Method Summary collapse

Instance Method Details

#attribute_snapshotObject



21
22
23
24
25
26
27
# File 'lib/auditor/audit.rb', line 21

def attribute_snapshot
  attributes = {}.with_indifferent_access
  self.class.modifying.trail(self).each do |predecessor|
    attributes.merge!(predecessor.new_attributes)
  end
  attributes
end