Audit saves the changes to ActiveRecord models. It has the following attributes:
auditable
: the ActiveRecord
model that was changed
user
: the user that performed the change; a string or an ActiveRecord model
action
: one of create, update, or delete
audited_changes
: a hash of all the changes
comment
: a comment set with the audit
version
: the version of the model
request_uuid
: a uuid based that allows audits from the same
controller request
created_at
: Time that the change was performed
# File lib/audited/audit.rb, line 26 def dump(obj) if Audited.audit_class.columns_hash["audited_changes"].type.to_s == "text" ActiveRecord::Coders::YAMLColumn.new(Object).dump(obj) else obj end end
# File lib/audited/audit.rb, line 18 def load(obj) if Audited.audit_class.columns_hash["audited_changes"].type.to_s == "text" ActiveRecord::Coders::YAMLColumn.new(Object).load(obj) else obj end end