class Audited::YAMLIfTextColumnType

Audit saves the changes to ActiveRecord models. It has the following attributes:

Public Class Methods

dump(obj) click to toggle source
# 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
load(obj) click to toggle source
# 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