Class: Audit

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

Instance Method Summary collapse

Instance Method Details

#attribute_snapshotObject



29
30
31
32
33
34
35
# File 'lib/auditor/audit.rb', line 29

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